Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/is-string/test/ drwxr-xr-x |
Viewing file: Select action/file-type: 'use strict'; var test = require('tape'); var isString = require('../'); var hasToStringTag = require('has-tostringtag/shams')(); test('not Strings', function (t) { t.notOk(isString(), 'undefined is not String'); t.notOk(isString(null), 'null is not String'); t.notOk(isString(false), 'false is not String'); t.notOk(isString(true), 'true is not String'); t.notOk(isString([]), 'array is not String'); t.notOk(isString({}), 'object is not String'); t.notOk(isString(function () {}), 'function is not String'); t.notOk(isString(/a/g), 'regex literal is not String'); t.notOk(isString(new RegExp('a', 'g')), 'regex object is not String'); t.notOk(isString(new Date()), 'new Date() is not String'); t.notOk(isString(42), 'number is not String'); t.notOk(isString(Object(42)), 'number object is not String'); t.notOk(isString(NaN), 'NaN is not String'); t.notOk(isString(Infinity), 'Infinity is not String'); t.end(); }); test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var fakeString = { toString: function () { return '7'; }, valueOf: function () { return '42'; } }; fakeString[Symbol.toStringTag] = 'String'; t.notOk(isString(fakeString), 'fake String with @@toStringTag "String" is not String'); t.end(); }); test('Strings', function (t) { t.ok(isString('foo'), 'string primitive is String'); t.ok(isString(Object('foo')), 'string object is String'); t.end(); }); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.005 ]-- |