Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

is-string

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

is-string

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

    1.0.7latest

Version published
Maintainers
1
Weekly downloads
25,259,680
decreased by-2.64%

Weekly downloads

Changelog

Source

v1.0.7 - 2021-08-05

Commits

  • [Refactor] use has-tostringtag to behave correctly in the presence of symbol shams d973ffd
  • [Dev Deps] update auto-changelog, core-js, eslint, tape 4bfaabf

Readme

Source

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

Keywords

FAQs

What is is-string?

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

Is is-string popular?

The npm package is-string receives a total of 20,510,625 weekly downloads. As such, is-string popularity was classified as popular.

Is is-string well maintained?

We found that is-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 06 Aug 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc