Socket
Socket
Sign inDemoInstall

is-string

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

.github/FUNDING.yml

95

CHANGELOG.md

@@ -1,19 +0,84 @@

1.0.4 / 2015-01-29
=================
* If @@toStringTag is not present, use the old-school Object#toString test.
# Changelog
1.0.3 / 2015-01-29
=================
* Refactor to aid optimization of non-try/catch code.
All notable changes to this project will be documented in this file.
1.0.2 / 2015-01-29
=================
* Fix broken package.json
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1.0.1 / 2015-01-29
=================
* Add early exits for typeof "string", or typeof not "object".
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1.0.0 / 2015-01-29
=================
* Initial release.
## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-19
### Commits
- [Tests] use shared travis-ci configs [`4121d6b`](https://github.com/inspect-js/is-string/commit/4121d6b168ae1d54a81791ee6877f9813cab6253)
- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`e7a3e89`](https://github.com/inspect-js/is-string/commit/e7a3e89ccb9638d73f45dbcb2a42e509bd3153c4)
- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`6c380a7`](https://github.com/inspect-js/is-string/commit/6c380a70011714370e754fa0df95f56cdcaa3e60)
- [Tests] remove `jscs` [`3d49592`](https://github.com/inspect-js/is-string/commit/3d49592b9880fcb1a23b67286445281131a553e3)
- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `eslint`, `nsp`, `semver`. [`cc6983d`](https://github.com/inspect-js/is-string/commit/cc6983d06bc98f4ae9b7c9439d5d73c7318d8acd)
- [meta] add `auto-changelog` [`b857897`](https://github.com/inspect-js/is-string/commit/b85789723ce3a7064536598e0fcdd495257c6134)
- [meta] remove unused Makefile and associated utilities [`3f0f51c`](https://github.com/inspect-js/is-string/commit/3f0f51cbae1f97dbe1466eee88d105b3df0d2f0a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `covert`, `tape`, `semver` [`9d4a95e`](https://github.com/inspect-js/is-string/commit/9d4a95e4473fe8195501878525b5af5948aa45c9)
- Update `eslint` [`e861b4b`](https://github.com/inspect-js/is-string/commit/e861b4bc71f5390670aebdff91119a1f8aeeb88a)
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`172e2dd`](https://github.com/inspect-js/is-string/commit/172e2dd1a0b9eb042bcb9a80ff5e774a90ff0695)
- Test on `node` and `io.js` latest. [`fd426cd`](https://github.com/inspect-js/is-string/commit/fd426cd18b22b0d0e1731598125393dcfe0c5704)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`23bdf83`](https://github.com/inspect-js/is-string/commit/23bdf83cf42138eba09f45bd0b040b069f9839d4)
- [actions] add automatic rebasing / merge commit blocking [`96153c0`](https://github.com/inspect-js/is-string/commit/96153c0d687a7fda2261f4c02add5d0b41e8aed7)
- [meta] create FUNDING.yml [`66ae246`](https://github.com/inspect-js/is-string/commit/66ae246d6cdaa4ccbc21f7c144b672139b8ccef6)
- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`817361a`](https://github.com/inspect-js/is-string/commit/817361a9673cd1ec9854b52578a980159f7d8701)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`fc35d3f`](https://github.com/inspect-js/is-string/commit/fc35d3feb40921bb22e1639903cb7f2fab77814b)
- [Dev Deps] update `jscs` [`886767e`](https://github.com/inspect-js/is-string/commit/886767e04e5ad59ac0bc926a87233cc8546c8b4f)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`3410922`](https://github.com/inspect-js/is-string/commit/341092203c11a3b92eee55a7ecb7b8265e8fcecd)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4d6c73b`](https://github.com/inspect-js/is-string/commit/4d6c73b507bcd39050ef71e554069f72fc5b222a)
- Update `nsp`, `eslint` [`b11de49`](https://github.com/inspect-js/is-string/commit/b11de4910beee1ffe1e67fbe25ec6707ca796b27)
- Update `eslint`, `semver` [`0777977`](https://github.com/inspect-js/is-string/commit/0777977757a85a1db75831d03a14b4b1fde05d7e)
- Only apps should have lockfiles [`78b49ff`](https://github.com/inspect-js/is-string/commit/78b49ffd04d4cd8c57d9e7b485421fbf3641b41b)
- [meta] add `funding` field [`81328a6`](https://github.com/inspect-js/is-string/commit/81328a6ef3eee989164127e4c0c82f1da73d3567)
- [Dev Deps] update `eslint`, `tape` [`fc9a225`](https://github.com/inspect-js/is-string/commit/fc9a225b27935f7c9c2704281d7fddd3614d3cb8)
- [Tests] use `eclint` instead of `editorconfig-tools` [`59c2c61`](https://github.com/inspect-js/is-string/commit/59c2c610dbd8e8ca1e4aa3fa9c9f93205cab9b07)
- [Dev Deps] Update `tape`, `eslint` [`a429816`](https://github.com/inspect-js/is-string/commit/a429816688e23c81948b4ae72324c26c27849b7c)
- Test on `io.js` `v2.2` [`08b476e`](https://github.com/inspect-js/is-string/commit/08b476ed0734a70e3091c04ddd2f173a2df21eb2)
- Test up to `io.js` `v3.0` [`22637ef`](https://github.com/inspect-js/is-string/commit/22637ef9e0030533df85cf1992fc099a88b1924c)
- [meta] add `safe-publish-latest` [`20ccb48`](https://github.com/inspect-js/is-string/commit/20ccb48fd85f0245eb893507d00003090da020d0)
- [Dev Deps] update `tape` [`06b58a0`](https://github.com/inspect-js/is-string/commit/06b58a048c2a820e5611ad2bd9ddfbe893295a57)
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`ea7cf84`](https://github.com/inspect-js/is-string/commit/ea7cf849b952c924d1687a302098251a7b827c80)
- Test on `io.js` `v2.4` [`66ec3ea`](https://github.com/inspect-js/is-string/commit/66ec3ea390b364583a792799b53857fd186ccc88)
- Test on `io.js` `v2.3` [`ca6e796`](https://github.com/inspect-js/is-string/commit/ca6e796f16ec433b88962162fde8012f28e18f1e)
- Fix tests for faked @@toStringTag [`3cce832`](https://github.com/inspect-js/is-string/commit/3cce8329133dfd233987359df151018b3b136be1)
## [v1.0.4](https://github.com/inspect-js/is-string/compare/v1.0.3...v1.0.4) - 2015-01-30
### Commits
- If @@toStringTag is not present, use the old-school Object#toString test. [`30675ec`](https://github.com/inspect-js/is-string/commit/30675ecb5c5cc43873918661a414a1d0f8b77325)
## [v1.0.3](https://github.com/inspect-js/is-string/compare/v1.0.2...v1.0.3) - 2015-01-29
### Commits
- Refactor to aid optimization of non-try/catch code. [`9b2772a`](https://github.com/inspect-js/is-string/commit/9b2772abe09ba8cbaa631322cc226ee906d2db22)
## [v1.0.2](https://github.com/inspect-js/is-string/compare/v1.0.1...v1.0.2) - 2015-01-29
### Commits
- Fix broken package.json [`dc921d3`](https://github.com/inspect-js/is-string/commit/dc921d332b64e4041162f04e4712b0dc687863a5)
## [v1.0.1](https://github.com/inspect-js/is-string/compare/v1.0.0...v1.0.1) - 2015-01-29
### Commits
- Fix eslint config. [`c4e05bd`](https://github.com/inspect-js/is-string/commit/c4e05bd171da6002d432e451fd48912db8b048e0)
- Add early exits for typeof "string", or typeof not "object". [`82f41d3`](https://github.com/inspect-js/is-string/commit/82f41d36a599bc6a06152792c84c7683e412c513)
## v1.0.0 - 2015-01-28
### Commits
- Dotfiles. [`45bc9dd`](https://github.com/inspect-js/is-string/commit/45bc9dd60201722344986a6c7536be9ea9ccefbf)
- `make release` [`23707f5`](https://github.com/inspect-js/is-string/commit/23707f5ecfdf00afb0e57c06ac07f7f49cdeb606)
- package.json [`575ad81`](https://github.com/inspect-js/is-string/commit/575ad811c61b156cfbcc60ff61947183c6ebe6a2)
- Read me [`3f67c9a`](https://github.com/inspect-js/is-string/commit/3f67c9a0725f811845d38646a19322895cd03981)
- Initial commit [`2c26a7a`](https://github.com/inspect-js/is-string/commit/2c26a7a2e41dec77be2c59d5847f29a6ab7c0b29)
- Tests. [`38c987b`](https://github.com/inspect-js/is-string/commit/38c987b8513b0ac03b0897e0fce7de8135d4ee0f)
- Implementation. [`0471d59`](https://github.com/inspect-js/is-string/commit/0471d59078d7f3f77619913ec21c57c0af27114c)

8

index.js

@@ -17,5 +17,9 @@ 'use strict';

module.exports = function isString(value) {
if (typeof value === 'string') { return true; }
if (typeof value !== 'object') { return false; }
if (typeof value === 'string') {
return true;
}
if (typeof value !== 'object') {
return false;
}
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};
{
"name": "is-string",
"version": "1.0.4",
"author": "Jordan Harband",
"version": "1.0.5",
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",

@@ -9,10 +12,12 @@ "license": "MIT",

"scripts": {
"test": "npm run lint && node --harmony --es-staging test.js && npm run security",
"coverage": "covert test.js",
"coverage-quiet": "covert test.js --quiet",
"lint": "npm run jscs && npm run eslint",
"jscs": "jscs test.js *.js",
"eslint": "eslint test.js *.js",
"eccheck": "editorconfig-tools check *.js **/*.js > /dev/null",
"security": "nsp package"
"prepublish": "safe-publish-latest",
"pretest": "npm run lint",
"tests-only": "node --harmony --es-staging test",
"test": "npm run tests-only",
"posttest": "npx aud",
"coverage": "covert test/index.js",
"lint": "eslint .",
"eccheck": "eclint check *.js **/*.js > /dev/null",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},

@@ -33,15 +38,15 @@ "repository": {

"devDependencies": {
"foreach": "~2.0.5",
"is": "~2.2.0",
"tape": "~3.4.0",
"indexof": "~0.0.1",
"covert": "1.0.0",
"jscs": "~1.10.0",
"editorconfig-tools": "~0.0.1",
"nsp": "~1.0.0",
"eslint": "~0.13.0",
"semver": "~4.2.0"
"@ljharb/eslint-config": "^15.0.2",
"auto-changelog": "^1.16.2",
"covert": "^1.1.1",
"eclint": "^2.8.1",
"eslint": "^6.7.2",
"foreach": "^2.0.5",
"indexof": "^0.0.1",
"is": "^3.3.0",
"safe-publish-latest": "^1.1.4",
"tape": "^4.12.0"
},
"testling": {
"files": "test.js",
"files": "test/index.js",
"browsers": [

@@ -65,4 +70,10 @@ "iexplore/6.0..latest",

"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
}
}

@@ -44,3 +44,3 @@ # is-string <sup>[![Version Badge][2]][1]</sup>

[1]: https://npmjs.org/package/is-string
[2]: http://vb.teelaun.ch/ljharb/is-string.svg
[2]: http://versionbadg.es/ljharb/is-string.svg
[3]: https://travis-ci.org/ljharb/is-string.svg

@@ -47,0 +47,0 @@ [4]: https://travis-ci.org/ljharb/is-string

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc