All Projects → inspect-js → is-string

inspect-js / is-string

Licence: MIT license
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to is-string

utils.js
👷 🔧 zero dependencies vanilla JavaScript utils.
Stars: ✭ 14 (-17.65%)
Mutual labels:  string, object
Stringfication
🔨 Make all objects to String!
Stars: ✭ 33 (+94.12%)
Mutual labels:  string, object
DataTypes
Built-in data types
Stars: ✭ 34 (+100%)
Mutual labels:  string, object
prototyped.js
Some common Typescript prototypes
Stars: ✭ 22 (+29.41%)
Mutual labels:  string, object
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (+1476.47%)
Mutual labels:  string, object
php-helpers
An extensive set of PHP helper functions and classes.
Stars: ✭ 27 (+58.82%)
Mutual labels:  string, object
obj-to-table
Create a table from an array of objects
Stars: ✭ 15 (-11.76%)
Mutual labels:  string, object
Object.getOwnPropertyDescriptors
Spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.
Stars: ✭ 19 (+11.76%)
Mutual labels:  object
string-math
Evaluates a math expression from a string. Supports variables and custom operators.
Stars: ✭ 14 (-17.65%)
Mutual labels:  string
comment-mark
Interpolate strings with HTML comment markers!
Stars: ✭ 21 (+23.53%)
Mutual labels:  string
String.prototype.trim
ES5 spec-compliant shim for String.prototype.trim
Stars: ✭ 13 (-23.53%)
Mutual labels:  string
copy-anything
An optimised way to copy'ing (cloning) an Object or Array. A small and simple integration
Stars: ✭ 19 (+11.76%)
Mutual labels:  object
compact str
A memory efficient string type that can store up to 24* bytes on the stack
Stars: ✭ 322 (+1794.12%)
Mutual labels:  string
qverse
Traverse any data with DPML commands.
Stars: ✭ 25 (+47.06%)
Mutual labels:  object
hydrate-text
A small, dependency-free and strongly typed template engine.
Stars: ✭ 45 (+164.71%)
Mutual labels:  string
MGObfuscator
An easy encryptor / decryptor for iOS
Stars: ✭ 17 (+0%)
Mutual labels:  string
string-similarity-js
Lightweight string similarity function for javascript
Stars: ✭ 29 (+70.59%)
Mutual labels:  string
strutil
Golang metrics for calculating string similarity and other string utility functions
Stars: ✭ 114 (+570.59%)
Mutual labels:  string
goin
`in` operator for go
Stars: ✭ 17 (+0%)
Mutual labels:  string
CarND-VehicleDetection
vehicle detection with deep learning
Stars: ✭ 34 (+100%)
Mutual labels:  object

is-string Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isString = require('is-string');
var assert = require('assert');

assert.notOk(isString(undefined));
assert.notOk(isString(null));
assert.notOk(isString(false));
assert.notOk(isString(true));
assert.notOk(isString(function () {}));
assert.notOk(isString([]));
assert.notOk(isString({}));
assert.notOk(isString(/a/g));
assert.notOk(isString(new RegExp('a', 'g')));
assert.notOk(isString(new Date()));
assert.notOk(isString(42));
assert.notOk(isString(NaN));
assert.notOk(isString(Infinity));
assert.notOk(isString(new Number(42)));

assert.ok(isString('foo'));
assert.ok(isString(Object('foo')));

Tests

Simply clone the repo, npm install, and run npm test

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].