This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+1
View File
@@ -0,0 +1 @@
coverage/
+10
View File
@@ -0,0 +1,10 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"exclude": [
"coverage",
"test",
"test-corejs.js"
]
}
+33 -3
View File
@@ -7,7 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-19
## [v1.0.7](https://github.com/inspect-js/is-string/compare/v1.0.6...v1.0.7) - 2021-08-05
### Commits
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`d973ffd`](https://github.com/inspect-js/is-string/commit/d973ffd2268e10c0e2cd4f0c57ecf8ce0a8d8578)
- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4bfaabf`](https://github.com/inspect-js/is-string/commit/4bfaabf877e874ca21d2c44be26f13add8ee2761)
## [v1.0.6](https://github.com/inspect-js/is-string/compare/v1.0.5...v1.0.6) - 2021-05-07
### Commits
- [Tests] migrate tests to Github Actions [`c7790c8`](https://github.com/inspect-js/is-string/commit/c7790c89e5077251fe7ca32ac29eeee02f1b2751)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`1e52bbd`](https://github.com/inspect-js/is-string/commit/1e52bbd19b1608f6932c0335d9981824584c3186)
- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`83337eb`](https://github.com/inspect-js/is-string/commit/83337ebf55308b7bb9c1befae420760e0f8d8016)
- [meta] do not publish github action workflow files [`b25aea2`](https://github.com/inspect-js/is-string/commit/b25aea2e8a53ed9e9090cf96481590cdc00a0957)
- [readme] update badges [`759ccd9`](https://github.com/inspect-js/is-string/commit/759ccd94de4a2000231a179f91af6b5c12c11e00)
- [Tests] run `nyc` on all tests [`dc02f70`](https://github.com/inspect-js/is-string/commit/dc02f7080c355f0d24368c1622db09f7cc30cdbd)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape`; add `aud` [`a0f76fa`](https://github.com/inspect-js/is-string/commit/a0f76fa1990bb580948f9e2daa89bdcda3fae7f0)
- [actions] add "Allow Edits" workflow [`9ec3902`](https://github.com/inspect-js/is-string/commit/9ec390295b4faef7744d2b579c1050be66168cb7)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`57fbe21`](https://github.com/inspect-js/is-string/commit/57fbe215da83a3b601855a9c6543ad1a96de5702)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`191e55f`](https://github.com/inspect-js/is-string/commit/191e55ff1fa782654ffcce2df922e23345b56690)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`1ea2b81`](https://github.com/inspect-js/is-string/commit/1ea2b81e866775a7890e75c44c742204124aa354)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`105d1b9`](https://github.com/inspect-js/is-string/commit/105d1b9851e366ef23c2a27d4064e0d36da25939)
- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`114cfad`](https://github.com/inspect-js/is-string/commit/114cfad854d8860421f847cd99a3bdb8ef1353dc)
- [meta] use `prepublishOnly` script for npm 7+ [`fc38f26`](https://github.com/inspect-js/is-string/commit/fc38f26adb486f50880c5771d145ab2bffb6247a)
- [meta] gitignore coverage output [`3419127`](https://github.com/inspect-js/is-string/commit/34191278f1fa09ba4da801a6fd7a32e31050e759)
- [actions] update rebase action to use checkout v2 [`334eca0`](https://github.com/inspect-js/is-string/commit/334eca02d40f4cf7dc15a8e7d5ff06852028abb5)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`7a332e9`](https://github.com/inspect-js/is-string/commit/7a332e963f1ab717fafa671e0fa8a1b20c53d861)
- [meta] remove explicit audit level config [`04630b1`](https://github.com/inspect-js/is-string/commit/04630b1b535084322ddeae8efb79a8810d7cf325)
## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-18
### Commits
@@ -46,7 +76,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- 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
## [v1.0.4](https://github.com/inspect-js/is-string/compare/v1.0.3...v1.0.4) - 2015-01-29
### Commits
@@ -71,7 +101,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- 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
## v1.0.0 - 2015-01-29
### Commits
+14 -15
View File
@@ -1,6 +1,7 @@
# is-string <sup>[![Version Badge][2]][1]</sup>
[![Build Status][3]][4]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
@@ -8,8 +9,6 @@
[![npm badge][11]][1]
[![browser support][9]][10]
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
@@ -41,17 +40,17 @@ assert.ok(isString(Object('foo')));
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-string
[2]: http://versionbadg.es/ljharb/is-string.svg
[3]: https://travis-ci.org/ljharb/is-string.svg
[4]: https://travis-ci.org/ljharb/is-string
[5]: https://david-dm.org/ljharb/is-string.svg
[6]: https://david-dm.org/ljharb/is-string
[7]: https://david-dm.org/ljharb/is-string/dev-status.svg
[8]: https://david-dm.org/ljharb/is-string#info=devDependencies
[9]: https://ci.testling.com/ljharb/is-string.png
[10]: https://ci.testling.com/ljharb/is-string
[2]: https://versionbadg.es/inspect-js/is-string.svg
[5]: https://david-dm.org/inspect-js/is-string.svg
[6]: https://david-dm.org/inspect-js/is-string
[7]: https://david-dm.org/inspect-js/is-string/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-string#info=devDependencies
[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/is-string.svg
[license-image]: https://img.shields.io/npm/l/is-string.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/is-string.svg
[downloads-url]: http://npm-stat.com/charts.html?package=is-string
[downloads-image]: https://img.shields.io/npm/dm/is-string.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-string
[codecov-image]: https://codecov.io/gh/inspect-js/is-string/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-string/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-string
[actions-url]: https://github.com/inspect-js/is-string/actions
+1 -1
View File
@@ -11,7 +11,7 @@ var tryStringObject = function tryStringObject(value) {
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var hasToStringTag = require('has-tostringtag/shams')();
module.exports = function isString(value) {
if (typeof value === 'string') {
+32 -25
View File
@@ -1,33 +1,35 @@
{
"_args": [
[
"is-string@1.0.5",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
"is-string@1.0.7",
"/home/node/nuxt"
]
],
"_development": true,
"_from": "is-string@1.0.5",
"_id": "is-string@1.0.5",
"_from": "is-string@1.0.7",
"_id": "is-string@1.0.7",
"_inBundle": false,
"_integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
"_integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
"_location": "/is-string",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-string@1.0.5",
"raw": "is-string@1.0.7",
"name": "is-string",
"escapedName": "is-string",
"rawSpec": "1.0.5",
"rawSpec": "1.0.7",
"saveSpec": null,
"fetchSpec": "1.0.5"
"fetchSpec": "1.0.7"
},
"_requiredBy": [
"/array-includes"
"/array-includes",
"/array.prototype.reduce",
"/es-abstract",
"/which-boxed-primitive"
],
"_resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
"_spec": "1.0.5",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"_resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
"_spec": "1.0.7",
"_where": "/home/node/nuxt",
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com"
@@ -42,19 +44,23 @@
"bugs": {
"url": "https://github.com/ljharb/is-string/issues"
},
"dependencies": {},
"dependencies": {
"has-tostringtag": "^1.0.0"
},
"description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",
"devDependencies": {
"@ljharb/eslint-config": "^15.0.2",
"auto-changelog": "^1.16.2",
"covert": "^1.1.1",
"@ljharb/eslint-config": "^17.6.0",
"aud": "^1.1.5",
"auto-changelog": "^2.3.0",
"core-js": "^3.16.0",
"eclint": "^2.8.1",
"eslint": "^6.7.2",
"eslint": "^7.32.0",
"foreach": "^2.0.5",
"indexof": "^0.0.1",
"is": "^3.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^1.1.4",
"tape": "^4.12.0"
"tape": "^5.3.0"
},
"engines": {
"node": ">= 0.4"
@@ -79,15 +85,16 @@
"url": "git://github.com/ljharb/is-string.git"
},
"scripts": {
"coverage": "covert test/index.js",
"eccheck": "eclint check *.js **/*.js > /dev/null",
"lint": "eslint .",
"posttest": "npx aud",
"posttest": "npx aud --production",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublish": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "node --harmony --es-staging test",
"test": "npm run tests-only && npm run test:corejs",
"test:corejs": "nyc tape test-corejs.js",
"tests-only": "nyc tape 'test/**/*.js'",
"version": "auto-changelog && git add CHANGELOG.md"
},
"testling": {
@@ -108,5 +115,5 @@
"android-browser/4.2"
]
},
"version": "1.0.5"
"version": "1.0.7"
}
+3 -3
View File
@@ -1,8 +1,8 @@
'use strict';
var test = require('tape');
var isString = require('..');
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
var isString = require('../');
var hasToStringTag = require('has-tostringtag/shams')();
test('not Strings', function (t) {
t.notOk(isString(), 'undefined is not String');
@@ -22,7 +22,7 @@ test('not Strings', function (t) {
t.end();
});
test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) {
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
var fakeString = {
toString: function () { return '7'; },
valueOf: function () { return '42'; }