mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 01:16:00 +00:00
Modules
This commit is contained in:
19
node_modules/is-string/.eslintrc
generated
vendored
Normal file
19
node_modules/is-string/.eslintrc
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"func-name-matching": 0,
|
||||
"max-statements": [2, 15]
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["test.js"],
|
||||
"rules": {
|
||||
"no-magic-numbers": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
node_modules/is-string/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/is-string/.github/FUNDING.yml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/is-string
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
15
node_modules/is-string/.github/workflows/rebase.yml
generated
vendored
Normal file
15
node_modules/is-string/.github/workflows/rebase.yml
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
name: Automatic Rebase
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
_:
|
||||
name: "Automatic Rebase"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ljharb/rebase@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
12
node_modules/is-string/.travis.yml
generated
vendored
Normal file
12
node_modules/is-string/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: ~> 1.0
|
||||
language: node_js
|
||||
os:
|
||||
- linux
|
||||
import:
|
||||
- ljharb/travis-ci:node/all.yml
|
||||
- ljharb/travis-ci:node/pretest.yml
|
||||
- ljharb/travis-ci:node/posttest.yml
|
||||
- ljharb/travis-ci:node/coverage.yml
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: COVERAGE=true
|
84
node_modules/is-string/CHANGELOG.md
generated
vendored
Normal file
84
node_modules/is-string/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
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).
|
||||
|
||||
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
|
||||
|
||||
### 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)
|
22
node_modules/is-string/LICENSE
generated
vendored
Normal file
22
node_modules/is-string/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
57
node_modules/is-string/README.md
generated
vendored
Normal file
57
node_modules/is-string/README.md
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
# is-string <sup>[![Version Badge][2]][1]</sup>
|
||||
|
||||
[![Build Status][3]][4]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![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
|
||||
|
||||
```js
|
||||
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`
|
||||
|
||||
[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
|
||||
[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true
|
||||
[license-image]: http://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
|
24
node_modules/is-string/index.js
generated
vendored
Normal file
24
node_modules/is-string/index.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
var strValue = String.prototype.valueOf;
|
||||
var tryStringObject = function tryStringObject(value) {
|
||||
try {
|
||||
strValue.call(value);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var toStr = Object.prototype.toString;
|
||||
var strClass = '[object String]';
|
||||
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
||||
|
||||
module.exports = function isString(value) {
|
||||
if (typeof value === 'string') {
|
||||
return true;
|
||||
}
|
||||
if (typeof value !== 'object') {
|
||||
return false;
|
||||
}
|
||||
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
|
||||
};
|
109
node_modules/is-string/package.json
generated
vendored
Normal file
109
node_modules/is-string/package.json
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
{
|
||||
"_from": "is-string@^1.0.4",
|
||||
"_id": "is-string@1.0.5",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
|
||||
"_location": "/is-string",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-string@^1.0.4",
|
||||
"name": "is-string",
|
||||
"escapedName": "is-string",
|
||||
"rawSpec": "^1.0.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/es-get-iterator",
|
||||
"/which-boxed-primitive"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
|
||||
"_shasum": "40493ed198ef3ff477b8c7f92f644ec82a5cd3a6",
|
||||
"_spec": "is-string@^1.0.4",
|
||||
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\es-get-iterator",
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/is-string/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"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",
|
||||
"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"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/is-string#readme",
|
||||
"keywords": [
|
||||
"String",
|
||||
"string",
|
||||
"ES6",
|
||||
"toStringTag",
|
||||
"@@toStringTag",
|
||||
"String object"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "is-string",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"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",
|
||||
"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",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "node --harmony --es-staging test",
|
||||
"version": "auto-changelog && git add CHANGELOG.md"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"version": "1.0.5"
|
||||
}
|
39
node_modules/is-string/test/index.js
generated
vendored
Normal file
39
node_modules/is-string/test/index.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var isString = require('..');
|
||||
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
|
||||
|
||||
test('not Strings', function (t) {
|
||||
t.notOk(isString(), 'undefined is not String');
|
||||
t.notOk(isString(null), 'null is not String');
|
||||
t.notOk(isString(false), 'false is not String');
|
||||
t.notOk(isString(true), 'true is not String');
|
||||
t.notOk(isString([]), 'array is not String');
|
||||
t.notOk(isString({}), 'object is not String');
|
||||
t.notOk(isString(function () {}), 'function is not String');
|
||||
t.notOk(isString(/a/g), 'regex literal is not String');
|
||||
t.notOk(isString(new RegExp('a', 'g')), 'regex object is not String');
|
||||
t.notOk(isString(new Date()), 'new Date() is not String');
|
||||
t.notOk(isString(42), 'number is not String');
|
||||
t.notOk(isString(Object(42)), 'number object is not String');
|
||||
t.notOk(isString(NaN), 'NaN is not String');
|
||||
t.notOk(isString(Infinity), 'Infinity is not String');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) {
|
||||
var fakeString = {
|
||||
toString: function () { return '7'; },
|
||||
valueOf: function () { return '42'; }
|
||||
};
|
||||
fakeString[Symbol.toStringTag] = 'String';
|
||||
t.notOk(isString(fakeString), 'fake String with @@toStringTag "String" is not String');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Strings', function (t) {
|
||||
t.ok(isString('foo'), 'string primitive is String');
|
||||
t.ok(isString(Object('foo')), 'string object is String');
|
||||
t.end();
|
||||
});
|
Reference in New Issue
Block a user