package
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
npm install is-stringGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 13 packages.
235.9 kB
Includes dependencies.
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
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/
Simply clone the repo, npm install, and run npm test