From e21b6ebd9ae1a543864f9667dd141979c87b6724 Mon Sep 17 00:00:00 2001 From: Darcy Clarke Date: Mon, 14 Nov 2022 19:05:11 -0500 Subject: [PATCH] deep-equal@1.1.1 --- node_modules/call-bind/.eslintignore | 1 + node_modules/call-bind/.github/FUNDING.yml | 12 + node_modules/call-bind/.nycrc | 13 + node_modules/call-bind/CHANGELOG.md | 42 +++ node_modules/call-bind/LICENSE | 21 ++ node_modules/call-bind/README.md | 2 + node_modules/call-bind/callBound.js | 15 + node_modules/call-bind/index.js | 47 +++ node_modules/call-bind/package.json | 110 ++++++ node_modules/call-bind/test/callBound.js | 55 +++ node_modules/call-bind/test/index.js | 66 ++++ .../functions-have-names/.editorconfig | 20 ++ .../functions-have-names/.github/FUNDING.yml | 12 + node_modules/functions-have-names/.nycrc | 9 + .../functions-have-names/CHANGELOG.md | 89 +++++ node_modules/functions-have-names/LICENSE | 21 ++ node_modules/functions-have-names/README.md | 40 +++ node_modules/functions-have-names/index.js | 31 ++ .../functions-have-names/package.json | 83 +++++ .../functions-have-names/test/index.js | 65 ++++ .../get-intrinsic/.github/FUNDING.yml | 12 + node_modules/get-intrinsic/.nycrc | 9 + node_modules/get-intrinsic/CHANGELOG.md | 98 +++++ node_modules/get-intrinsic/LICENSE | 21 ++ node_modules/get-intrinsic/README.md | 71 ++++ node_modules/get-intrinsic/index.js | 334 ++++++++++++++++++ .../has-symbols/.github/FUNDING.yml | 12 + .../node_modules/has-symbols/.nycrc | 9 + .../node_modules/has-symbols/CHANGELOG.md | 75 ++++ .../node_modules/has-symbols/LICENSE | 21 ++ .../node_modules/has-symbols/README.md | 46 +++ .../node_modules/has-symbols/index.js | 13 + .../node_modules/has-symbols/package.json | 126 +++++++ .../node_modules/has-symbols/shams.js | 42 +++ .../node_modules/has-symbols/test/index.js | 22 ++ .../has-symbols/test/shams/core-js.js | 28 ++ .../test/shams/get-own-property-symbols.js | 28 ++ .../node_modules/has-symbols/test/tests.js | 56 +++ node_modules/get-intrinsic/package.json | 119 +++++++ .../get-intrinsic/test/GetIntrinsic.js | 274 ++++++++++++++ .../has-tostringtag/.github/FUNDING.yml | 12 + node_modules/has-tostringtag/CHANGELOG.md | 20 ++ node_modules/has-tostringtag/LICENSE | 21 ++ node_modules/has-tostringtag/README.md | 46 +++ node_modules/has-tostringtag/index.js | 7 + .../has-symbols/.github/FUNDING.yml | 12 + .../node_modules/has-symbols/.nycrc | 9 + .../node_modules/has-symbols/CHANGELOG.md | 75 ++++ .../node_modules/has-symbols/LICENSE | 21 ++ .../node_modules/has-symbols/README.md | 46 +++ .../node_modules/has-symbols/index.js | 13 + .../node_modules/has-symbols/package.json | 126 +++++++ .../node_modules/has-symbols/shams.js | 42 +++ .../node_modules/has-symbols/test/index.js | 22 ++ .../has-symbols/test/shams/core-js.js | 28 ++ .../test/shams/get-own-property-symbols.js | 28 ++ .../node_modules/has-symbols/test/tests.js | 56 +++ node_modules/has-tostringtag/package.json | 109 ++++++ node_modules/has-tostringtag/shams.js | 7 + node_modules/has-tostringtag/test/index.js | 21 ++ .../has-tostringtag/test/shams/core-js.js | 28 ++ .../test/shams/get-own-property-symbols.js | 28 ++ node_modules/has-tostringtag/test/tests.js | 14 + node_modules/is-arguments/.editorconfig | 20 ++ node_modules/is-arguments/.eslintignore | 1 + node_modules/is-arguments/.github/FUNDING.yml | 12 + node_modules/is-arguments/.nycrc | 9 + node_modules/is-arguments/CHANGELOG.md | 179 ++++++++++ node_modules/is-arguments/LICENSE | 20 ++ node_modules/is-arguments/README.md | 47 +++ node_modules/is-arguments/index.js | 33 ++ node_modules/is-arguments/package.json | 116 ++++++ node_modules/is-arguments/test/index.js | 44 +++ node_modules/object-is/.eslintignore | 1 + node_modules/object-is/.nycrc | 13 + node_modules/object-is/CHANGELOG.md | 150 ++++++++ node_modules/object-is/LICENSE | 20 ++ node_modules/object-is/README.md | 60 ++++ node_modules/object-is/auto.js | 3 + node_modules/object-is/implementation.js | 19 + node_modules/object-is/index.js | 18 + node_modules/object-is/package.json | 114 ++++++ node_modules/object-is/polyfill.js | 7 + node_modules/object-is/shim.js | 14 + node_modules/object-is/test/implementation.js | 12 + node_modules/object-is/test/index.js | 12 + node_modules/object-is/test/shimmed.js | 28 ++ node_modules/object-is/test/tests.js | 57 +++ .../regexp.prototype.flags/.editorconfig | 13 + node_modules/regexp.prototype.flags/.nycrc | 9 + .../regexp.prototype.flags/CHANGELOG.md | 190 ++++++++++ node_modules/regexp.prototype.flags/LICENSE | 22 ++ node_modules/regexp.prototype.flags/README.md | 54 +++ node_modules/regexp.prototype.flags/auto.js | 3 + .../regexp.prototype.flags/implementation.js | 39 ++ node_modules/regexp.prototype.flags/index.js | 18 + .../regexp.prototype.flags/package.json | 124 +++++++ .../regexp.prototype.flags/polyfill.js | 36 ++ node_modules/regexp.prototype.flags/shim.js | 26 ++ .../test/implementation.js | 20 ++ .../regexp.prototype.flags/test/index.js | 17 + .../regexp.prototype.flags/test/shimmed.js | 48 +++ .../regexp.prototype.flags/test/tests.js | 141 ++++++++ package-lock.json | 107 +++++- package.json | 2 +- 105 files changed, 4834 insertions(+), 5 deletions(-) create mode 100644 node_modules/call-bind/.eslintignore create mode 100644 node_modules/call-bind/.github/FUNDING.yml create mode 100644 node_modules/call-bind/.nycrc create mode 100644 node_modules/call-bind/CHANGELOG.md create mode 100644 node_modules/call-bind/LICENSE create mode 100644 node_modules/call-bind/README.md create mode 100644 node_modules/call-bind/callBound.js create mode 100644 node_modules/call-bind/index.js create mode 100644 node_modules/call-bind/package.json create mode 100644 node_modules/call-bind/test/callBound.js create mode 100644 node_modules/call-bind/test/index.js create mode 100644 node_modules/functions-have-names/.editorconfig create mode 100644 node_modules/functions-have-names/.github/FUNDING.yml create mode 100644 node_modules/functions-have-names/.nycrc create mode 100644 node_modules/functions-have-names/CHANGELOG.md create mode 100644 node_modules/functions-have-names/LICENSE create mode 100644 node_modules/functions-have-names/README.md create mode 100644 node_modules/functions-have-names/index.js create mode 100644 node_modules/functions-have-names/package.json create mode 100644 node_modules/functions-have-names/test/index.js create mode 100644 node_modules/get-intrinsic/.github/FUNDING.yml create mode 100644 node_modules/get-intrinsic/.nycrc create mode 100644 node_modules/get-intrinsic/CHANGELOG.md create mode 100644 node_modules/get-intrinsic/LICENSE create mode 100644 node_modules/get-intrinsic/README.md create mode 100644 node_modules/get-intrinsic/index.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/.nycrc create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/CHANGELOG.md create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/LICENSE create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/README.md create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/index.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/package.json create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/shams.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/test/index.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js create mode 100644 node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js create mode 100644 node_modules/get-intrinsic/package.json create mode 100644 node_modules/get-intrinsic/test/GetIntrinsic.js create mode 100644 node_modules/has-tostringtag/.github/FUNDING.yml create mode 100644 node_modules/has-tostringtag/CHANGELOG.md create mode 100644 node_modules/has-tostringtag/LICENSE create mode 100644 node_modules/has-tostringtag/README.md create mode 100644 node_modules/has-tostringtag/index.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/.github/FUNDING.yml create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/.nycrc create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/CHANGELOG.md create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/LICENSE create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/README.md create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/index.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/package.json create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/shams.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/test/index.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/test/shams/core-js.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-tostringtag/node_modules/has-symbols/test/tests.js create mode 100644 node_modules/has-tostringtag/package.json create mode 100644 node_modules/has-tostringtag/shams.js create mode 100644 node_modules/has-tostringtag/test/index.js create mode 100644 node_modules/has-tostringtag/test/shams/core-js.js create mode 100644 node_modules/has-tostringtag/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-tostringtag/test/tests.js create mode 100644 node_modules/is-arguments/.editorconfig create mode 100644 node_modules/is-arguments/.eslintignore create mode 100644 node_modules/is-arguments/.github/FUNDING.yml create mode 100644 node_modules/is-arguments/.nycrc create mode 100644 node_modules/is-arguments/CHANGELOG.md create mode 100644 node_modules/is-arguments/LICENSE create mode 100644 node_modules/is-arguments/README.md create mode 100644 node_modules/is-arguments/index.js create mode 100644 node_modules/is-arguments/package.json create mode 100644 node_modules/is-arguments/test/index.js create mode 100644 node_modules/object-is/.eslintignore create mode 100644 node_modules/object-is/.nycrc create mode 100644 node_modules/object-is/CHANGELOG.md create mode 100644 node_modules/object-is/LICENSE create mode 100644 node_modules/object-is/README.md create mode 100644 node_modules/object-is/auto.js create mode 100644 node_modules/object-is/implementation.js create mode 100644 node_modules/object-is/index.js create mode 100644 node_modules/object-is/package.json create mode 100644 node_modules/object-is/polyfill.js create mode 100644 node_modules/object-is/shim.js create mode 100644 node_modules/object-is/test/implementation.js create mode 100644 node_modules/object-is/test/index.js create mode 100644 node_modules/object-is/test/shimmed.js create mode 100644 node_modules/object-is/test/tests.js create mode 100644 node_modules/regexp.prototype.flags/.editorconfig create mode 100644 node_modules/regexp.prototype.flags/.nycrc create mode 100644 node_modules/regexp.prototype.flags/CHANGELOG.md create mode 100644 node_modules/regexp.prototype.flags/LICENSE create mode 100644 node_modules/regexp.prototype.flags/README.md create mode 100644 node_modules/regexp.prototype.flags/auto.js create mode 100644 node_modules/regexp.prototype.flags/implementation.js create mode 100644 node_modules/regexp.prototype.flags/index.js create mode 100644 node_modules/regexp.prototype.flags/package.json create mode 100644 node_modules/regexp.prototype.flags/polyfill.js create mode 100644 node_modules/regexp.prototype.flags/shim.js create mode 100644 node_modules/regexp.prototype.flags/test/implementation.js create mode 100644 node_modules/regexp.prototype.flags/test/index.js create mode 100644 node_modules/regexp.prototype.flags/test/shimmed.js create mode 100644 node_modules/regexp.prototype.flags/test/tests.js diff --git a/node_modules/call-bind/.eslintignore b/node_modules/call-bind/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/call-bind/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/call-bind/.github/FUNDING.yml b/node_modules/call-bind/.github/FUNDING.yml new file mode 100644 index 0000000000000..c70c2ecdb216d --- /dev/null +++ b/node_modules/call-bind/.github/FUNDING.yml @@ -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/call-bind +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'] diff --git a/node_modules/call-bind/.nycrc b/node_modules/call-bind/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/call-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/call-bind/CHANGELOG.md b/node_modules/call-bind/CHANGELOG.md new file mode 100644 index 0000000000000..62a37279ec644 --- /dev/null +++ b/node_modules/call-bind/CHANGELOG.md @@ -0,0 +1,42 @@ +# 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). + +## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11 + +### Commits + +- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d) + +## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08 + +### Commits + +- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1) +- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e) +- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb) +- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71) +- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee) +- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2) +- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8) +- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6) + +## v1.0.0 - 2020-10-30 + +### Commits + +- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50) +- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df) +- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65) +- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13) +- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4) +- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717) +- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af) +- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650) +- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f) diff --git a/node_modules/call-bind/LICENSE b/node_modules/call-bind/LICENSE new file mode 100644 index 0000000000000..48f05d01d0aca --- /dev/null +++ b/node_modules/call-bind/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 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. diff --git a/node_modules/call-bind/README.md b/node_modules/call-bind/README.md new file mode 100644 index 0000000000000..53649eb462244 --- /dev/null +++ b/node_modules/call-bind/README.md @@ -0,0 +1,2 @@ +# call-bind +Robustly `.call.bind()` a function. diff --git a/node_modules/call-bind/callBound.js b/node_modules/call-bind/callBound.js new file mode 100644 index 0000000000000..8374adfd0549f --- /dev/null +++ b/node_modules/call-bind/callBound.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('./'); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; diff --git a/node_modules/call-bind/index.js b/node_modules/call-bind/index.js new file mode 100644 index 0000000000000..6fa3e4af7e19f --- /dev/null +++ b/node_modules/call-bind/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} diff --git a/node_modules/call-bind/package.json b/node_modules/call-bind/package.json new file mode 100644 index 0000000000000..989360bdad88f --- /dev/null +++ b/node_modules/call-bind/package.json @@ -0,0 +1,110 @@ +{ + "_from": "call-bind@^1.0.2", + "_id": "call-bind@1.0.2", + "_inBundle": false, + "_integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "_location": "/call-bind", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "call-bind@^1.0.2", + "name": "call-bind", + "escapedName": "call-bind", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/is-arguments", + "/object-is", + "/regexp.prototype.flags" + ], + "_resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "_shasum": "b1d4e89e688119c3c9a903ad30abb2f6a919be3c", + "_spec": "call-bind@^1.0.2", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/is-arguments", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/ljharb/call-bind/issues" + }, + "bundleDependencies": false, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "deprecated": false, + "description": "Robustly `.call.bind()` a function", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.17.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.1.1" + }, + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./callBound": [ + { + "default": "./callBound.js" + }, + "./callBound.js" + ], + "./package.json": "./package.json" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/call-bind#readme", + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "callbind", + "callbound", + "call", + "bind", + "bound", + "call-bind", + "call-bound", + "function", + "es-abstract" + ], + "license": "MIT", + "main": "index.js", + "name": "call-bind", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/call-bind.git" + }, + "scripts": { + "lint": "eslint --ext=.js,.mjs .", + "posttest": "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", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/*'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "version": "1.0.2" +} diff --git a/node_modules/call-bind/test/callBound.js b/node_modules/call-bind/test/callBound.js new file mode 100644 index 0000000000000..209ce3cc3b267 --- /dev/null +++ b/node_modules/call-bind/test/callBound.js @@ -0,0 +1,55 @@ +'use strict'; + +var test = require('tape'); + +var callBound = require('../callBound'); + +test('callBound', function (t) { + // static primitive + t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); + t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); + + // static non-function object + t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); + t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); + t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); + t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); + + // static function + t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); + t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); + + // prototype primitive + t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); + t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); + + // prototype function + t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); + t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); + t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); + t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); + + t['throws']( + function () { callBound('does not exist'); }, + SyntaxError, + 'nonexistent intrinsic throws' + ); + t['throws']( + function () { callBound('does not exist', true); }, + SyntaxError, + 'allowMissing arg still throws for unknown intrinsic' + ); + + /* globals WeakRef: false */ + t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { + st['throws']( + function () { callBound('WeakRef'); }, + TypeError, + 'real but absent intrinsic throws' + ); + st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/call-bind/test/index.js b/node_modules/call-bind/test/index.js new file mode 100644 index 0000000000000..bf6769c7c89bf --- /dev/null +++ b/node_modules/call-bind/test/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var callBind = require('../'); +var bind = require('function-bind'); + +var test = require('tape'); + +/* + * older engines have length nonconfigurable + * in io.js v3, it is configurable except on bound functions, hence the .bind() + */ +var functionsHaveConfigurableLengths = !!( + Object.getOwnPropertyDescriptor + && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable +); + +test('callBind', function (t) { + var sentinel = { sentinel: true }; + var func = function (a, b) { + // eslint-disable-next-line no-invalid-this + return [this, a, b]; + }; + t.equal(func.length, 2, 'original function length is 2'); + t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); + t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); + t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); + + var bound = callBind(func); + t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); + t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args'); + t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args'); + + var boundR = callBind(func, sentinel); + t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); + t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); + t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); + + var boundArg = callBind(func, sentinel, 1); + t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); + t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); + t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); + + t.test('callBind.apply', function (st) { + var aBound = callBind.apply(func); + st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args'); + st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + + var aBoundArg = callBind.apply(func); + st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args'); + st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + + var aBoundR = callBind.apply(func, sentinel); + st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args'); + st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args'); + st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/functions-have-names/.editorconfig b/node_modules/functions-have-names/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/functions-have-names/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/functions-have-names/.github/FUNDING.yml b/node_modules/functions-have-names/.github/FUNDING.yml new file mode 100644 index 0000000000000..1b81d18bc0ae2 --- /dev/null +++ b/node_modules/functions-have-names/.github/FUNDING.yml @@ -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/functions-have-names +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'] diff --git a/node_modules/functions-have-names/.nycrc b/node_modules/functions-have-names/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/functions-have-names/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/functions-have-names/CHANGELOG.md b/node_modules/functions-have-names/CHANGELOG.md new file mode 100644 index 0000000000000..1026b701d7865 --- /dev/null +++ b/node_modules/functions-have-names/CHANGELOG.md @@ -0,0 +1,89 @@ +# 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). + +## [v1.2.3](https://github.com/inspect-js/functions-have-names/compare/v1.2.2...v1.2.3) - 2022-04-19 + +### Fixed + +- [Fix] in IE 9-11, the descriptor is absent [`#11`](https://github.com/inspect-js/functions-have-names/issues/11) [`#25`](https://github.com/es-shims/RegExp.prototype.flags/issues/25) + +### Commits + +- [actions] reuse common workflows [`4ed274a`](https://github.com/inspect-js/functions-have-names/commit/4ed274a2441c7fd38ff6add741c309e268550d97) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`96dfcaa`](https://github.com/inspect-js/functions-have-names/commit/96dfcaaf1c9c5305f2b66ef69f9cddf1d9d9a578) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`9e674f8`](https://github.com/inspect-js/functions-have-names/commit/9e674f85520a93235e412a3fd7671d2356c6e45b) +- [readme] add github actions/codecov badges; update URLs [`d913f5b`](https://github.com/inspect-js/functions-have-names/commit/d913f5bf38ccab32d5fbea4a044b9cd93a4b9bec) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`f61058f`](https://github.com/inspect-js/functions-have-names/commit/f61058fe1e34f2cfa9235283a4fc6c0c0172c91a) +- [actions] update codecov uploader [`3348839`](https://github.com/inspect-js/functions-have-names/commit/33488394e7cadbf499bee4775c627c1370d033d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`ee1a321`](https://github.com/inspect-js/functions-have-names/commit/ee1a3211a40902af59aa629e3ac41ec36360dc1b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b8dc1a2`](https://github.com/inspect-js/functions-have-names/commit/b8dc1a277b08362bebedfeba2faca8964f68283b) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`0e825c4`](https://github.com/inspect-js/functions-have-names/commit/0e825c4ba8525b02d9acaaf2511371f76c0562ce) +- [meta] use `prepublishOnly` script for npm 7+ [`9489d66`](https://github.com/inspect-js/functions-have-names/commit/9489d666c59702ea6bafd3ff611b3eadfee6570e) + +## [v1.2.2](https://github.com/inspect-js/functions-have-names/compare/v1.2.1...v1.2.2) - 2020-12-14 + +### Commits + +- [Tests] migrate tests to Github Actions [`39bf4fe`](https://github.com/inspect-js/functions-have-names/commit/39bf4fe5ae5b3610a80ba13726f3ee00e3c49e2f) +- [meta] do not publish github action workflow files [`45ab0cb`](https://github.com/inspect-js/functions-have-names/commit/45ab0cbdc0da2efd64f5deb9810be63009bac4a0) +- [readme] add docs, fix URLs [`fad3af6`](https://github.com/inspect-js/functions-have-names/commit/fad3af61e9cbc27f47d2097614f43c62ae1022dd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`82df94a`](https://github.com/inspect-js/functions-have-names/commit/82df94ae06f05a5fa321dda9b7d902ac9fc26424) +- [Tests] run `nyc` on all tests; use `tape` runner [`8038329`](https://github.com/inspect-js/functions-have-names/commit/8038329fec493043639d9d8c779141dcb7d00c2d) +- [actions] add automatic rebasing / merge commit blocking [`49795eb`](https://github.com/inspect-js/functions-have-names/commit/49795ebf38ae3ba724ff7ac5c53598ec66ab814b) +- [actions] add "Allow Edits" workflow [`2096fe6`](https://github.com/inspect-js/functions-have-names/commit/2096fe6d67d435c0e0da25f3cfe9ff02991c41e6) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`ec1c6fe`](https://github.com/inspect-js/functions-have-names/commit/ec1c6fe209419c722d732cd512e4375c48366392) +- [Dev Deps] update `auto-changelog`; add `aud` [`79fdb23`](https://github.com/inspect-js/functions-have-names/commit/79fdb23d1ed2b4125f443be193c37330e634e654) +- [Tests] only audit prod deps [`d9ca245`](https://github.com/inspect-js/functions-have-names/commit/d9ca2455e26a45994024d1027344c268a06818bd) +- [Dev Deps] update `auto-changelog`, `tape` [`ac026d4`](https://github.com/inspect-js/functions-have-names/commit/ac026d4bda77e9820b74456fc752d2069e5b8a7f) +- [Dev Deps] update `tape` [`a8c5ee3`](https://github.com/inspect-js/functions-have-names/commit/a8c5ee3622b487938462f82698dae3ceb32da1a7) +- [Dev Deps] update `@ljharb/eslint-config` [`b25fafd`](https://github.com/inspect-js/functions-have-names/commit/b25fafd0923dcf53c3aeca92268e497ffd96ec34) + +## [v1.2.1](https://github.com/inspect-js/functions-have-names/compare/v1.2.0...v1.2.1) - 2020-01-19 + +### Commits + +- [Tests] use shared travis-ci configs [`612823a`](https://github.com/inspect-js/functions-have-names/commit/612823a064b4be4c61a1e52d1009abed4a4fc4fb) +- [Fix] IE 8 has a broken `Object.getOwnPropertyDescriptor` [`ba01c22`](https://github.com/inspect-js/functions-have-names/commit/ba01c22795162b787a698950ea34250ce68a7bb1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`; add `safe-publish-latest` [`b28d9d2`](https://github.com/inspect-js/functions-have-names/commit/b28d9d2e8bc0b758671bcaf2f7aa0d4ad4b42046) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`a62fbd6`](https://github.com/inspect-js/functions-have-names/commit/a62fbd69a34a2b1d1860acfa2afc6dcc839bc180) +- [meta] add `funding` field [`8734a94`](https://github.com/inspect-js/functions-have-names/commit/8734a940e39acdf7619eb89e358746bd278b4c90) + +## [v1.2.0](https://github.com/inspect-js/functions-have-names/compare/v1.1.1...v1.2.0) - 2019-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog` [`7e07444`](https://github.com/inspect-js/functions-have-names/commit/7e0744437789641ea462005d2e350ef476aa7141) +- [New] add `boundFunctionsHaveNames()` [`05661be`](https://github.com/inspect-js/functions-have-names/commit/05661be26c3c260bb3984e433dc9cea3fd82f9ac) + +## [v1.1.1](https://github.com/inspect-js/functions-have-names/compare/v1.1.0...v1.1.1) - 2019-07-24 + +### Commits + +- [Tests] fix linting errors [`0cb8017`](https://github.com/inspect-js/functions-have-names/commit/0cb8017203ae37d1e019bb1c99120f3f56a266a5) +- [Tests] fix tests when name is not configurable [`38a8aee`](https://github.com/inspect-js/functions-have-names/commit/38a8aeee0403bd7aa7f35da76dc433cbcdd3f85a) +- [Fix] ensure function name mangling does not break detection [`f6926ab`](https://github.com/inspect-js/functions-have-names/commit/f6926abaaebc81366f73cf0c3f874ad7e4ba16d2) + +## [v1.1.0](https://github.com/inspect-js/functions-have-names/compare/v1.0.0...v1.1.0) - 2019-07-23 + +### Commits + +- [New] add `functionsHaveConfigurableNames` function on main export [`ce73f75`](https://github.com/inspect-js/functions-have-names/commit/ce73f75891640a462326df7266d90b09519a5fca) + +## v1.0.0 - 2019-07-22 + +### Commits + +- [Tests] add travis.yml [`06ed096`](https://github.com/inspect-js/functions-have-names/commit/06ed09681a3dc067094562e8d21a31400a782add) +- Initial commit [`ced60bd`](https://github.com/inspect-js/functions-have-names/commit/ced60bd089539eb228c68fc2ad7c7bc04b959b02) +- npm init [`79088ab`](https://github.com/inspect-js/functions-have-names/commit/79088ab607e7e91a402e198ab6d1837a317c6fa9) +- add tests [`c9e8e09`](https://github.com/inspect-js/functions-have-names/commit/c9e8e09c5153797c97c324cca4b837540eddeff8) +- [Tests] add `npm run lint` [`988b924`](https://github.com/inspect-js/functions-have-names/commit/988b924a8a49ea5c0f30d5aa2b2ea9add0b39474) +- [meta] create FUNDING.yml [`2e443ef`](https://github.com/inspect-js/functions-have-names/commit/2e443ef67748214d05898b3da76f908a7e2d7488) +- [meta] add version scripts [`52005e3`](https://github.com/inspect-js/functions-have-names/commit/52005e3794fd0799db5963a5359846798cb95c14) +- implementation [`b7b4942`](https://github.com/inspect-js/functions-have-names/commit/b7b49421ef69fb5e042194a650cb4f71bb4996e4) +- Only apps should have lockfiles [`81d2e04`](https://github.com/inspect-js/functions-have-names/commit/81d2e04e7a43cbff2e46e72781bb0693dbb67800) +- [Tests] use `npx aud` [`baa92d8`](https://github.com/inspect-js/functions-have-names/commit/baa92d8aba331fe8821663bc14baf2e11685474a) diff --git a/node_modules/functions-have-names/LICENSE b/node_modules/functions-have-names/LICENSE new file mode 100644 index 0000000000000..3900dd7e2ffe6 --- /dev/null +++ b/node_modules/functions-have-names/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 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. diff --git a/node_modules/functions-have-names/README.md b/node_modules/functions-have-names/README.md new file mode 100644 index 0000000000000..70962607cd607 --- /dev/null +++ b/node_modules/functions-have-names/README.md @@ -0,0 +1,40 @@ +# functions-have-names [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does this JS environment support the `name` property on functions? + +## Example + +```js +var functionsHaveNames = require('functions-have-names'); +var assert = require('assert'); + +assert.equal(functionsHaveNames(), true); // will be `false` in IE 6-8 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/functions-have-names +[npm-version-svg]: https://versionbadg.es/inspect-js/functions-have-names.svg +[deps-svg]: https://david-dm.org/inspect-js/functions-have-names.svg +[deps-url]: https://david-dm.org/inspect-js/functions-have-names +[dev-deps-svg]: https://david-dm.org/inspect-js/functions-have-names/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/functions-have-names#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/functions-have-names.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/functions-have-names.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/functions-have-names.svg +[downloads-url]: https://npm-stat.com/charts.html?package=functions-have-names +[codecov-image]: https://codecov.io/gh/inspect-js/functions-have-names/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/functions-have-names/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/functions-have-names +[actions-url]: https://github.com/inspect-js/functions-have-names/actions diff --git a/node_modules/functions-have-names/index.js b/node_modules/functions-have-names/index.js new file mode 100644 index 0000000000000..9d699dc190ed1 --- /dev/null +++ b/node_modules/functions-have-names/index.js @@ -0,0 +1,31 @@ +'use strict'; + +var functionsHaveNames = function functionsHaveNames() { + return typeof function f() {}.name === 'string'; +}; + +var gOPD = Object.getOwnPropertyDescriptor; +if (gOPD) { + try { + gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + gOPD = null; + } +} + +functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function () {}, 'name'); + return !!desc && !!desc.configurable; +}; + +var $bind = Function.prototype.bind; + +functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; +}; + +module.exports = functionsHaveNames; diff --git a/node_modules/functions-have-names/package.json b/node_modules/functions-have-names/package.json new file mode 100644 index 0000000000000..3cf31a457d995 --- /dev/null +++ b/node_modules/functions-have-names/package.json @@ -0,0 +1,83 @@ +{ + "_from": "functions-have-names@^1.2.2", + "_id": "functions-have-names@1.2.3", + "_inBundle": false, + "_integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "_location": "/functions-have-names", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "functions-have-names@^1.2.2", + "name": "functions-have-names", + "escapedName": "functions-have-names", + "rawSpec": "^1.2.2", + "saveSpec": null, + "fetchSpec": "^1.2.2" + }, + "_requiredBy": [ + "/regexp.prototype.flags" + ], + "_resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "_shasum": "0404fe4ee2ba2f607f0e0ec3c80bae994133b834", + "_spec": "functions-have-names@^1.2.2", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/regexp.prototype.flags", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/inspect-js/functions-have-names/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Does this JS environment support the `name` property on functions?", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/inspect-js/functions-have-names#readme", + "keywords": [ + "function", + "name", + "es5", + "names", + "functions", + "ie" + ], + "license": "MIT", + "main": "index.js", + "name": "functions-have-names", + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/functions-have-names.git" + }, + "scripts": { + "lint": "eslint --ext=js,mjs .", + "posttest": "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": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "version": "1.2.3" +} diff --git a/node_modules/functions-have-names/test/index.js b/node_modules/functions-have-names/test/index.js new file mode 100644 index 0000000000000..0d451ce62b6ed --- /dev/null +++ b/node_modules/functions-have-names/test/index.js @@ -0,0 +1,65 @@ +'use strict'; + +var test = require('tape'); + +var hasNames = require('../'); + +test('named functions', function (t) { + function f() {} // eslint-disable-line func-style + var g = function h() {}; + + t.equal(typeof hasNames, 'function', 'is a function'); + t.equal(hasNames(), f.name === 'f' && g.name === 'h', 'functions have names or not as expected'); + + t.end(); +}); + +var oDP = Object.defineProperty; +if (oDP) { + try { + oDP({}, 'a', { value: 1 }); + } catch (e) { + oDP = null; + } +} + +test('functionsHaveConfigurableNames', function (t) { + t.equal(typeof hasNames.functionsHaveConfigurableNames, 'function', 'is a function'); + + if (hasNames()) { + var fn = function f() {}; + if (oDP) { + try { + oDP(fn, 'name', { configurable: true, value: 'foo' }); + } catch (e) {} + if (fn.name === 'f') { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } else if (fn.name === 'foo') { + t.equal(hasNames.functionsHaveConfigurableNames(), true, 'function names are not configurable'); + } else { + t.fail('functions have names, but something surprising has happened. Please report this!'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'functions do not have names'); + } + + t.end(); +}); + +test('boundFunctionsHaveNames', function (t) { + t.equal(typeof hasNames.boundFunctionsHaveNames, 'function', 'is a function'); + + var fn = function f() {}; + if (typeof fn.bind !== 'function') { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because .bind does not exist'); + } else if (hasNames()) { + t.equal(hasNames.boundFunctionsHaveNames(), fn.bind().name !== '', 'bound functions have names'); + } else { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because none do'); + } + + t.end(); +}); diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000000000..8e8da0dda153d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -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/get-intrinsic +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'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000000000..1bb52d384701f --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,98 @@ +# 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). + +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000000000..48f05d01d0aca --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 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. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000000000..3aa0bba4037e5 --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000000000..3c3d93eb7943e --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,334 @@ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('has'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000000000..04cf87e66ed8d --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml @@ -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/has-symbols +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'] diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/.nycrc b/node_modules/get-intrinsic/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/CHANGELOG.md b/node_modules/get-intrinsic/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000000000..cd532a2b460b2 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,75 @@ +# 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). + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/LICENSE b/node_modules/get-intrinsic/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000000000..df31cbf3c064d --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 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. diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/README.md b/node_modules/get-intrinsic/node_modules/has-symbols/README.md new file mode 100644 index 0000000000000..33905f0fc92c4 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![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] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/index.js b/node_modules/get-intrinsic/node_modules/has-symbols/index.js new file mode 100644 index 0000000000000..17044fa21daa7 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/package.json b/node_modules/get-intrinsic/node_modules/has-symbols/package.json new file mode 100644 index 0000000000000..58b721af8870c --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/package.json @@ -0,0 +1,126 @@ +{ + "_from": "has-symbols@^1.0.3", + "_id": "has-symbols@1.0.3", + "_inBundle": false, + "_integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "_location": "/get-intrinsic/has-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-symbols@^1.0.3", + "name": "has-symbols", + "escapedName": "has-symbols", + "rawSpec": "^1.0.3", + "saveSpec": null, + "fetchSpec": "^1.0.3" + }, + "_requiredBy": [ + "/get-intrinsic" + ], + "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "_shasum": "bb7b2c4349251dce87b125f7bdf874aa7c8b39f8", + "_spec": "has-symbols@^1.0.3", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/get-intrinsic", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "deprecated": false, + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "license": "MIT", + "main": "index.js", + "name": "has-symbols", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "scripts": { + "lint": "eslint --ext=js,mjs .", + "posttest": "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": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "test:staging": "nyc node --harmony --es-staging test", + "test:stock": "nyc node test", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "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.3" +} diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/shams.js b/node_modules/get-intrinsic/node_modules/has-symbols/shams.js new file mode 100644 index 0000000000000..1285210ef7cce --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/test/index.js b/node_modules/get-intrinsic/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000000000..352129ca356c8 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js b/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000000000..df5365c23ed74 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000000000..9191b248baa14 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js b/node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000000000..89edd1291ca79 --- /dev/null +++ b/node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js @@ -0,0 +1,56 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000000000..e37b75355740a --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,119 @@ +{ + "_from": "get-intrinsic@^1.0.2", + "_id": "get-intrinsic@1.1.3", + "_inBundle": false, + "_integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "_location": "/get-intrinsic", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-intrinsic@^1.0.2", + "name": "get-intrinsic", + "escapedName": "get-intrinsic", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/call-bind" + ], + "_resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "_shasum": "063c84329ad93e83893c7f4f243ef63ffa351385", + "_spec": "get-intrinsic@^1.0.2", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/call-bind", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "bundleDependencies": false, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "deprecated": false, + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.2", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" + }, + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "license": "MIT", + "main": "index.js", + "name": "get-intrinsic", + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "scripts": { + "lint": "eslint --ext=.js,.mjs .", + "posttest": "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)\")\"", + "prelint": "evalmd README.md", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "version": "1.1.3" +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000000000..7e0ea30f699d9 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bind/callBound'); +var v = require('es-value-fixtures'); +var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor'); +var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/has-tostringtag/.github/FUNDING.yml b/node_modules/has-tostringtag/.github/FUNDING.yml new file mode 100644 index 0000000000000..7a450e70826f1 --- /dev/null +++ b/node_modules/has-tostringtag/.github/FUNDING.yml @@ -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/has-tostringtag +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'] diff --git a/node_modules/has-tostringtag/CHANGELOG.md b/node_modules/has-tostringtag/CHANGELOG.md new file mode 100644 index 0000000000000..39fb77cf7dbc2 --- /dev/null +++ b/node_modules/has-tostringtag/CHANGELOG.md @@ -0,0 +1,20 @@ +# 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). + +## v1.0.0 - 2021-08-05 + +### Commits + +- Tests [`6b6f573`](https://github.com/inspect-js/has-tostringtag/commit/6b6f5734dc2058badb300ff0783efdad95fe1a65) +- Initial commit [`2f8190e`](https://github.com/inspect-js/has-tostringtag/commit/2f8190e799fac32ba9b95a076c0255e01d7ce475) +- [meta] do not publish github action workflow files [`6e08cc4`](https://github.com/inspect-js/has-tostringtag/commit/6e08cc4e0fea7ec71ef66e70734b2af2c4a8b71b) +- readme [`94bed6c`](https://github.com/inspect-js/has-tostringtag/commit/94bed6c9560cbbfda034f8d6c260bb7b0db33c1a) +- npm init [`be67840`](https://github.com/inspect-js/has-tostringtag/commit/be67840ab92ee7adb98bcc65261975543f815fa5) +- Implementation [`c4914ec`](https://github.com/inspect-js/has-tostringtag/commit/c4914ecc51ddee692c85b471ae0a5d8123030fbf) +- [meta] use `auto-changelog` [`4aaf768`](https://github.com/inspect-js/has-tostringtag/commit/4aaf76895ae01d7b739f2b19f967ef2372506cd7) +- Only apps should have lockfiles [`bc4d99e`](https://github.com/inspect-js/has-tostringtag/commit/bc4d99e4bf494afbaa235c5f098df6e642edf724) +- [meta] add `safe-publish-latest` [`6523c05`](https://github.com/inspect-js/has-tostringtag/commit/6523c05c9b87140f3ae74c9daf91633dd9ff4e1f) diff --git a/node_modules/has-tostringtag/LICENSE b/node_modules/has-tostringtag/LICENSE new file mode 100644 index 0000000000000..7948bc02a7937 --- /dev/null +++ b/node_modules/has-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +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. diff --git a/node_modules/has-tostringtag/README.md b/node_modules/has-tostringtag/README.md new file mode 100644 index 0000000000000..67a5e929dfce4 --- /dev/null +++ b/node_modules/has-tostringtag/README.md @@ -0,0 +1,46 @@ +# has-tostringtag [![Version Badge][2]][1] + +[![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] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams. + +## Example + +```js +var hasSymbolToStringTag = require('has-tostringtag'); + +hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable. + +var hasSymbolToStringTagKinda = require('has-tostringtag/shams'); +hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-tostringtag +[2]: https://versionbadg.es/inspect-js/has-tostringtag.svg +[5]: https://david-dm.org/inspect-js/has-tostringtag.svg +[6]: https://david-dm.org/inspect-js/has-tostringtag +[7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies +[11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag +[codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag +[actions-url]: https://github.com/inspect-js/has-tostringtag/actions diff --git a/node_modules/has-tostringtag/index.js b/node_modules/has-tostringtag/index.js new file mode 100644 index 0000000000000..d626b7a82cf9d --- /dev/null +++ b/node_modules/has-tostringtag/index.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols'); + +module.exports = function hasToStringTag() { + return hasSymbols() && typeof Symbol.toStringTag === 'symbol'; +}; diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-tostringtag/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000000000..04cf87e66ed8d --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/.github/FUNDING.yml @@ -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/has-symbols +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'] diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/.nycrc b/node_modules/has-tostringtag/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-tostringtag/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000000000..cd532a2b460b2 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,75 @@ +# 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). + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/LICENSE b/node_modules/has-tostringtag/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000000000..df31cbf3c064d --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 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. diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/README.md b/node_modules/has-tostringtag/node_modules/has-symbols/README.md new file mode 100644 index 0000000000000..33905f0fc92c4 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![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] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/index.js b/node_modules/has-tostringtag/node_modules/has-symbols/index.js new file mode 100644 index 0000000000000..17044fa21daa7 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/package.json b/node_modules/has-tostringtag/node_modules/has-symbols/package.json new file mode 100644 index 0000000000000..2ba73ab846826 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/package.json @@ -0,0 +1,126 @@ +{ + "_from": "has-symbols@^1.0.2", + "_id": "has-symbols@1.0.3", + "_inBundle": false, + "_integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "_location": "/has-tostringtag/has-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-symbols@^1.0.2", + "name": "has-symbols", + "escapedName": "has-symbols", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/has-tostringtag" + ], + "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "_shasum": "bb7b2c4349251dce87b125f7bdf874aa7c8b39f8", + "_spec": "has-symbols@^1.0.2", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/has-tostringtag", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "deprecated": false, + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "license": "MIT", + "main": "index.js", + "name": "has-symbols", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "scripts": { + "lint": "eslint --ext=js,mjs .", + "posttest": "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": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "test:staging": "nyc node --harmony --es-staging test", + "test:stock": "nyc node test", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "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.3" +} diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/shams.js b/node_modules/has-tostringtag/node_modules/has-symbols/shams.js new file mode 100644 index 0000000000000..1285210ef7cce --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/test/index.js b/node_modules/has-tostringtag/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000000000..352129ca356c8 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000000000..df5365c23ed74 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000000000..9191b248baa14 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/node_modules/has-symbols/test/tests.js b/node_modules/has-tostringtag/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000000000..89edd1291ca79 --- /dev/null +++ b/node_modules/has-tostringtag/node_modules/has-symbols/test/tests.js @@ -0,0 +1,56 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has-tostringtag/package.json b/node_modules/has-tostringtag/package.json new file mode 100644 index 0000000000000..613b438cef65f --- /dev/null +++ b/node_modules/has-tostringtag/package.json @@ -0,0 +1,109 @@ +{ + "_from": "has-tostringtag@^1.0.0", + "_id": "has-tostringtag@1.0.0", + "_inBundle": false, + "_integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "_location": "/has-tostringtag", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-tostringtag@^1.0.0", + "name": "has-tostringtag", + "escapedName": "has-tostringtag", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-arguments" + ], + "_resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "_shasum": "7e133818a7d394734f941e73c3d3f9291e658b25", + "_spec": "has-tostringtag@^1.0.0", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/is-arguments", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/inspect-js/has-tostringtag/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "dependencies": { + "has-symbols": "^1.0.2" + }, + "deprecated": false, + "description": "Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.", + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^2.6.12", + "eslint": "^7.32.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "exports": { + ".": "./index.js", + "./shams": "./shams.js", + "./package.json": "./package.json" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/inspect-js/has-tostringtag#readme", + "keywords": [ + "javascript", + "ecmascript", + "symbol", + "symbols", + "tostringtag", + "Symbol.toStringTag" + ], + "license": "MIT", + "main": "index.js", + "name": "has-tostringtag", + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-tostringtag.git" + }, + "scripts": { + "lint": "eslint --ext=js,mjs .", + "posttest": "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": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "test:staging": "nyc node --harmony --es-staging test", + "test:stock": "nyc node test", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "version": "1.0.0" +} diff --git a/node_modules/has-tostringtag/shams.js b/node_modules/has-tostringtag/shams.js new file mode 100644 index 0000000000000..8b7e401177726 --- /dev/null +++ b/node_modules/has-tostringtag/shams.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams'); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; diff --git a/node_modules/has-tostringtag/test/index.js b/node_modules/has-tostringtag/test/index.js new file mode 100644 index 0000000000000..0679afdfa78bf --- /dev/null +++ b/node_modules/has-tostringtag/test/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var hasSymbolToStringTag = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbolToStringTag, 'function', 'is a function'); + t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) { + t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined'); + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/core-js.js b/node_modules/has-tostringtag/test/shams/core-js.js new file mode 100644 index 0000000000000..692b86eb9af0e --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') { + test('has native Symbol.toStringTag support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol.toStringTag, 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000000000..489fe83632f7c --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/tests.js b/node_modules/has-tostringtag/test/tests.js new file mode 100644 index 0000000000000..0dae885c0ba5b --- /dev/null +++ b/node_modules/has-tostringtag/test/tests.js @@ -0,0 +1,14 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists'); + + if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; } + + var obj = {}; + obj[Symbol.toStringTag] = 'test'; + + t.equal(Object.prototype.toString.call(obj), '[object test]'); +}; diff --git a/node_modules/is-arguments/.editorconfig b/node_modules/is-arguments/.editorconfig new file mode 100644 index 0000000000000..bc228f8269443 --- /dev/null +++ b/node_modules/is-arguments/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-arguments/.eslintignore b/node_modules/is-arguments/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/is-arguments/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/is-arguments/.github/FUNDING.yml b/node_modules/is-arguments/.github/FUNDING.yml new file mode 100644 index 0000000000000..d29bb40ed4c97 --- /dev/null +++ b/node_modules/is-arguments/.github/FUNDING.yml @@ -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-arguments +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'] diff --git a/node_modules/is-arguments/.nycrc b/node_modules/is-arguments/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/is-arguments/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-arguments/CHANGELOG.md b/node_modules/is-arguments/CHANGELOG.md new file mode 100644 index 0000000000000..a1ddafe34e9d4 --- /dev/null +++ b/node_modules/is-arguments/CHANGELOG.md @@ -0,0 +1,179 @@ +# 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). + +## [v1.1.1](https://github.com/inspect-js/is-arguments/compare/v1.1.0...v1.1.1) - 2021-08-05 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`dd28b30`](https://github.com/inspect-js/is-arguments/commit/dd28b30f4237fac722f2ce05b0c1d7e63c4a81e4) +- [meta] do not publish github action workflow files [`87e489c`](https://github.com/inspect-js/is-arguments/commit/87e489cc77b709b96e73aaf9f9b2cd6da48f4960) +- [readme] fix repo URLs [`e2c2c6e`](https://github.com/inspect-js/is-arguments/commit/e2c2c6ee34ca21be4b19d282d96dd7ab75b63ae3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`b9ae62b`](https://github.com/inspect-js/is-arguments/commit/b9ae62b3a08a5fe84519865192e6287d5b6966f7) +- [readme] add github actions/codecov badges [`504c0a5`](https://github.com/inspect-js/is-arguments/commit/504c0a508dc313eae5942b1e35b2d031948de143) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`dc29e52`](https://github.com/inspect-js/is-arguments/commit/dc29e521d71da420414110919a1e0fde8ec6eba3) +- [Dev Deps] update `auto-changelog`, `eslint`, `tape` [`a966d25`](https://github.com/inspect-js/is-arguments/commit/a966d25535c5f050ca5ce43a1559f93698a7130b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1218944`](https://github.com/inspect-js/is-arguments/commit/12189445a195558fdccebe099c699272d2082aa8) +- [meta] use `prepublishOnly` script for npm 7+ [`757dbee`](https://github.com/inspect-js/is-arguments/commit/757dbee3ec6f6225d4c7c91582e045cc1183dbd8) +- [Deps] update `call-bind` [`b206f05`](https://github.com/inspect-js/is-arguments/commit/b206f059571c430375c632e40dd29249fa76a8fd) +- [actions] update workflows [`b89b2f1`](https://github.com/inspect-js/is-arguments/commit/b89b2f1ab98bedebdf97d2397246030a1132c84e) + +## [v1.1.0](https://github.com/inspect-js/is-arguments/compare/v1.0.4...v1.1.0) - 2020-12-04 + +### Commits + +- [Tests] use shared travis-ci configs [`fd59a37`](https://github.com/inspect-js/is-arguments/commit/fd59a3779f004f36ea8e5ac90b0de9b97ff60755) +- [Tests] migrate tests to Github Actions [`982a0d6`](https://github.com/inspect-js/is-arguments/commit/982a0d68495b68e2b6ca8f4caa9f8a909ec56755) +- [Tests] remove `jscs` [`927d4b5`](https://github.com/inspect-js/is-arguments/commit/927d4b5c17b12c40f445491e52a11d5bed311ef6) +- [meta] add `auto-changelog` [`ef0634b`](https://github.com/inspect-js/is-arguments/commit/ef0634b0c07a12d9144c4db168cb79963326ec6d) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`1689f8b`](https://github.com/inspect-js/is-arguments/commit/1689f8bf533c8ab8cd95caf953905e3a204c0cdc) +- [Tests] up to `node` `v11.7`, `v10.15`, `v8.15`, `v6.16` [`145aaeb`](https://github.com/inspect-js/is-arguments/commit/145aaeb5a35e7abd3a8a5c9ec87c6e37f16ed068) +- [readme] fix repo URLs, remove defunct badges [`cc484a3`](https://github.com/inspect-js/is-arguments/commit/cc484a3ae787125eccc30a05c63b7ff6a1581591) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`c888738`](https://github.com/inspect-js/is-arguments/commit/c888738ef1cf84b973169bbe6219b795de4acfc2) +- [Tests] run `nyc` on all tests [`0de8efb`](https://github.com/inspect-js/is-arguments/commit/0de8efb8091a3dd5708812cd26ad541f7dca773a) +- [actions] add automatic rebasing / merge commit blocking [`818775a`](https://github.com/inspect-js/is-arguments/commit/818775aa0c66064965517be554c3bcc57ec0d721) +- [Robustness] use `call-bind` [`31d0199`](https://github.com/inspect-js/is-arguments/commit/31d0199c1a560f113ff099a2f43068cdfe0af79e) +- [actions] add "Allow Edits" workflow [`0c55f7d`](https://github.com/inspect-js/is-arguments/commit/0c55f7d254ff335291d9cee39501b247f7248fb9) +- [meta] create FUNDING.yml [`ca7ed59`](https://github.com/inspect-js/is-arguments/commit/ca7ed597bac29790ac6233ff1bdff7704b870e96) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`1ae5053`](https://github.com/inspect-js/is-arguments/commit/1ae505390efff099c50d0bc786a3ecc8d5303b04) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`433f4a5`](https://github.com/inspect-js/is-arguments/commit/433f4a5573810fe689c5e56ad9fe69b6a2229b8c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`78ea4e8`](https://github.com/inspect-js/is-arguments/commit/78ea4e8261bc326c1ae7e9e50bb655e8bf128c6b) +- [Tests] use `npm audit` instead of `nsp` [`07fb85b`](https://github.com/inspect-js/is-arguments/commit/07fb85bf396880648c2d4285273968d478df4711) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`2204add`](https://github.com/inspect-js/is-arguments/commit/2204add22fcc15b1ee6aaae90578595b4f6d9647) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`ce150c0`](https://github.com/inspect-js/is-arguments/commit/ce150c0c47504779ce812b1aefe044fcad1286af) +- [Tests] fix tests from 0de8efb [`ee45fc3`](https://github.com/inspect-js/is-arguments/commit/ee45fc387b655de6feac101c478af111d488e144) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`03a312c`](https://github.com/inspect-js/is-arguments/commit/03a312cdae0aa058cfd094c996acb2af4e785484) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`25d2ef8`](https://github.com/inspect-js/is-arguments/commit/25d2ef8da0b90c834d1fa6b83410205832e271d4) +- [Dev Deps] update `auto-changelog`, `tape` [`0fe60b7`](https://github.com/inspect-js/is-arguments/commit/0fe60b74b7f1254c386e14d0ea6d9cc074fdf12c) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a9cbd0`](https://github.com/inspect-js/is-arguments/commit/4a9cbd0c91fd945ccc97c219d34e0840b0965586) +- [Dev Deps] update `auto-changelog`; add `aud` [`d9ff7d5`](https://github.com/inspect-js/is-arguments/commit/d9ff7d5f521eec5942019b1d7b38ace475da142f) +- [meta] add `funding` field [`adec2d2`](https://github.com/inspect-js/is-arguments/commit/adec2d293022ee3ec87479eaeae81bfec1ea1b18) +- [Tests] only audit prod deps [`f474960`](https://github.com/inspect-js/is-arguments/commit/f474960795eeb6087fc79eed8b787aa067b22ab1) + +## [v1.0.4](https://github.com/inspect-js/is-arguments/compare/v1.0.3...v1.0.4) - 2018-11-05 + +### Commits + +- [Fix] Fix errors about `in` operator. [`4d12e23`](https://github.com/inspect-js/is-arguments/commit/4d12e23fab8701207b7715fe7502db35c6edd3dd) + +## [v1.0.3](https://github.com/inspect-js/is-arguments/compare/v1.0.2...v1.0.3) - 2018-11-02 + +### Fixed + +- [Fix] add awareness of Symbol.toStringTag [`#20`](https://github.com/inspect-js/is-arguments/issues/20) + +### Commits + +- [Tests] up to `node` `v8.1`; `v7.10`, `v6.11`, `v4.8`; improve matrix; newer npm fails on older node [`ea5f23c`](https://github.com/inspect-js/is-arguments/commit/ea5f23c322234e18248b0acafe0f45333d5d78ec) +- [Tests] up to `node` `v9.1`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS. [`697a0a1`](https://github.com/inspect-js/is-arguments/commit/697a0a143d3b82f84956e4cca407c7eea228526b) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`40045c5`](https://github.com/inspect-js/is-arguments/commit/40045c5fe6ebb86f96125da96f7bfb9637579ce4) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`, `tape` [`08abc0d`](https://github.com/inspect-js/is-arguments/commit/08abc0d2e31c34514a58711f6203e41d06c3b81f) +- [Tests] up to `node` `v11.1`, `v10.13`, `v8.12` [`bf8d275`](https://github.com/inspect-js/is-arguments/commit/bf8d275ecf855c40c9c3f9c3ccf76874d4ce2497) +- [Tests] up to `node` `v7.0`, `v6.9`, `v4.6`; improve test matrix [`f813d86`](https://github.com/inspect-js/is-arguments/commit/f813d86b38f10d2e1f495597ca2a58d25a21339e) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`e4f9aee`](https://github.com/inspect-js/is-arguments/commit/e4f9aee64f0f7f2f9d8132992b81d133b5d3c9c7) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`6c98d11`](https://github.com/inspect-js/is-arguments/commit/6c98d1171a043a4ab21d70b813379a4162ac3702) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8e3178d`](https://github.com/inspect-js/is-arguments/commit/8e3178db172bc3ac889343aa3e38c24cc92aed08) +- package.json: use object form of "author", add "contributors" [`decc4fe`](https://github.com/inspect-js/is-arguments/commit/decc4feb9b31bd9f68b7a5f67aed39d32c9a6ab3) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`514902a`](https://github.com/inspect-js/is-arguments/commit/514902abde6b7d9397c9dbcd90f19fd78b70725a) +- [Tests] up to `node` `v5.6`, `v4.3` [`f11f47c`](https://github.com/inspect-js/is-arguments/commit/f11f47c5c1dae8adfda7ba1319de3b6e03db7925) +- [Dev Deps] add `npm run security` [`4adf82c`](https://github.com/inspect-js/is-arguments/commit/4adf82c0c9259eb81db18848a314b36db1c48d36) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`f587aeb`](https://github.com/inspect-js/is-arguments/commit/f587aeb3ec04f2d22c2a8fd7686a2153d0fd50d2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape` [`4f587bb`](https://github.com/inspect-js/is-arguments/commit/4f587bb7a2c499b1aa2e2aea60da8c0ee91c9df2) +- [Tests] up to `node` `v6.2`, `v5.11` [`36939c5`](https://github.com/inspect-js/is-arguments/commit/36939c5e1d8ce56c356a3f2144983839d86b3ae8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape` [`d779cc8`](https://github.com/inspect-js/is-arguments/commit/d779cc875bd6fa15d861a134065d629159051331) +- Only apps should have lockfiles [`f50ce65`](https://github.com/inspect-js/is-arguments/commit/f50ce65fe94728b6f127a0c11f2efc6473f56cf3) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`3025559`](https://github.com/inspect-js/is-arguments/commit/30255597cf578068e5a28d7a6e29076355132c87) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`3b9ddee`](https://github.com/inspect-js/is-arguments/commit/3b9ddeef740608d84d2b825b9a90e4adf049c905) +- [Tests] up to `v5.8`, `v4.4` [`d4902cf`](https://github.com/inspect-js/is-arguments/commit/d4902cfb07e0bfaa0788a7847fcaaba91c8e3435) +- [Tests] fix npm upgrades for older nodes [`c617dd3`](https://github.com/inspect-js/is-arguments/commit/c617dd3a7b6a70162cbeb985009620acd69c029d) +- [Tests] up to `node` `v5.3` [`cdd2a61`](https://github.com/inspect-js/is-arguments/commit/cdd2a617c3d1810149683596fe90024ae9dcc549) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7719172`](https://github.com/inspect-js/is-arguments/commit/77191721ef92ce9dc72fdae8e1cfdc2ec74317d9) +- [Dev Deps] update `es5-shim`, `tape`, `nsp`, `eslint` [`6a5f82b`](https://github.com/inspect-js/is-arguments/commit/6a5f82bc6d9407e64fc4c7794d546e4db8ab61ed) +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`c896c1c`](https://github.com/inspect-js/is-arguments/commit/c896c1c4629ff3c8cda25e0c3e607d2950ff4ba9) +- [Tests] Use `pretest` for running the linter. [`83db117`](https://github.com/inspect-js/is-arguments/commit/83db1173fde93c2d8a490663ce850321b018eab2) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint` [`57fdc63`](https://github.com/inspect-js/is-arguments/commit/57fdc636dea2f5c641e2d0c0dfbe0ac589acb69a) +- [Tests] up to `node` `v7.2` [`aa3eacf`](https://github.com/inspect-js/is-arguments/commit/aa3eacf27001a92aab4874f7d29f693ed6221b4a) +- [Tests] up to `node` `v5.10` [`94ff6d7`](https://github.com/inspect-js/is-arguments/commit/94ff6d72c095cae00a4df06043976dc3e414f49b) +- [Tests] on `node` `v4.2` [`cdb1fb5`](https://github.com/inspect-js/is-arguments/commit/cdb1fb5babe08c845570cbae218c0b96753c1152) + +## [v1.0.2](https://github.com/inspect-js/is-arguments/compare/v1.0.1...v1.0.2) - 2015-09-21 + +### Commits + +- Update `eslint`, use my personal shared config. [`8e211f4`](https://github.com/inspect-js/is-arguments/commit/8e211f46b17ae8d89aa5484b4b3b853d3d1b3fa9) +- In modern engines, only export the "is standard arguments" check. [`e8aa23f`](https://github.com/inspect-js/is-arguments/commit/e8aa23fc19f6d1c3c952174391a4903d90fcd622) +- Update `jscs`, `eslint`, `@ljharb/eslint-config` [`8a90bca`](https://github.com/inspect-js/is-arguments/commit/8a90bcad88025736a7c127123f1473af35bae6f7) +- Update `eslint` [`2214b5d`](https://github.com/inspect-js/is-arguments/commit/2214b5dac911e1eb949179f9034aa37ba7c079d7) +- Update `eslint` [`ca97c5b`](https://github.com/inspect-js/is-arguments/commit/ca97c5b22e7cf4f30d90ee1519988ecd4bf36887) +- [Dev Deps] update `jscs` [`ca6a477`](https://github.com/inspect-js/is-arguments/commit/ca6a477c16c70c0e5f29d56713237703ab610fdf) +- Update `covert`, `jscs`, `eslint` [`232d92a`](https://github.com/inspect-js/is-arguments/commit/232d92ab1dff7b0ad64024726cda437b32ce1906) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`460d700`](https://github.com/inspect-js/is-arguments/commit/460d700bdb5d8b261995e3d8f3e6b3eda4f91bcf) +- Test up to `io.js` `v2.3` [`7ef2293`](https://github.com/inspect-js/is-arguments/commit/7ef229388819ae1f1c1d55dbe741c90977cc3a3f) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`29f3d71`](https://github.com/inspect-js/is-arguments/commit/29f3d71eb516326409bd24bc7e6d4ebb6a872d01) +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`1c79a85`](https://github.com/inspect-js/is-arguments/commit/1c79a85d670d8dc5dbb1831ee0de0c8858a94775) +- `toString` as a variable name breaks in some older browsers. [`1e59f2b`](https://github.com/inspect-js/is-arguments/commit/1e59f2bf79454188145de5275a64996eafc94420) +- Update `tape`, `eslint` [`1efbefd`](https://github.com/inspect-js/is-arguments/commit/1efbefd84df6ae802245ebe6371cd15255ee23e7) +- Test up to `io.js` `v2.5` [`0760acc`](https://github.com/inspect-js/is-arguments/commit/0760acc3139d1930efebc4321c1f96ba1406e2de) +- Test up to `io.js` `v2.1` [`4c2245f`](https://github.com/inspect-js/is-arguments/commit/4c2245f3deccdb3ec70e4f79e5e8aac697f35d08) +- [Dev Deps] update `tape` [`348980e`](https://github.com/inspect-js/is-arguments/commit/348980e1666b66724e37c9df63d18d540a51d5fe) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`91d8c4f`](https://github.com/inspect-js/is-arguments/commit/91d8c4fd4516aae483fa2dd9c4a5b44c48e773f0) +- Update `tape` [`ec9b92a`](https://github.com/inspect-js/is-arguments/commit/ec9b92a244f7a077fe1df58af89f56a39d4d2600) +- Update `tape` [`6bc8969`](https://github.com/inspect-js/is-arguments/commit/6bc8969c40b2b2cd1c767933b7ef3d8ff65bf67f) +- Test on `io.js` `v3.0` [`33d9578`](https://github.com/inspect-js/is-arguments/commit/33d957814d515855583e98e652624e5920cc9496) + +## [v1.0.1](https://github.com/inspect-js/is-arguments/compare/v1.0.0...v1.0.1) - 2015-04-29 + +### Commits + +- Update `jscs`, add `npm run eslint` [`13a5f01`](https://github.com/inspect-js/is-arguments/commit/13a5f015aa67cb2402b5fdb21c68180ff7036a14) +- Using my standard jscs.json file [`d669fc4`](https://github.com/inspect-js/is-arguments/commit/d669fc49c0db56457eb55a77a2f9c40916ad6361) +- Adding `npm run lint` [`ece5d05`](https://github.com/inspect-js/is-arguments/commit/ece5d0581fadcff99b181d67b54eacb4869cfb98) +- Test on latest `io.js` [`908b092`](https://github.com/inspect-js/is-arguments/commit/908b092912fa9c89c20a41fdd117b21e857bfc84) +- Adding license and downloads badges [`05fd28b`](https://github.com/inspect-js/is-arguments/commit/05fd28b28d857ecb2220d0ac6267f36ec1e65eae) +- Make sure old and unstable nodes don't break Travis [`16ee7ea`](https://github.com/inspect-js/is-arguments/commit/16ee7eae70015864a8b3f2fe03463ecb4d707451) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`9846c79`](https://github.com/inspect-js/is-arguments/commit/9846c79d1999432538ea757c0dbf61ab3f0d54cd) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`27c014d`](https://github.com/inspect-js/is-arguments/commit/27c014d217d41d33b0bb1735e38184b871d86311) +- Use SVG instead of PNG badges [`ea01e68`](https://github.com/inspect-js/is-arguments/commit/ea01e68896722351c63912e37cc37541f9b78780) +- Remove unused links in README [`f5baaff`](https://github.com/inspect-js/is-arguments/commit/f5baaff1931bb9d48b20270a94d99121a3176dba) +- Test on latest `io.js` versions [`293e2c4`](https://github.com/inspect-js/is-arguments/commit/293e2c4d1edfdf9c6db88663314599ecde08a945) +- Update `tape`, `jscs` [`d72ab08`](https://github.com/inspect-js/is-arguments/commit/d72ab08147ab5256e1efd61c01b719796699faf0) +- Update `jscs` [`5f6e6d4`](https://github.com/inspect-js/is-arguments/commit/5f6e6d42645845b5663b5fef716e2963686aad8d) +- Update `tape`, `jscs` [`39ae55b`](https://github.com/inspect-js/is-arguments/commit/39ae55b6ef0c3d6206116bd7500bc601485d8698) +- Update `tape`, `jscs` [`594d928`](https://github.com/inspect-js/is-arguments/commit/594d92852cf7a4d93c8ff5ac157fdae9dbefc133) +- Updating dependencies [`183ac15`](https://github.com/inspect-js/is-arguments/commit/183ac151d27032fce4aaf3fa095cce9b086eb651) +- Update `tape` [`77b9cea`](https://github.com/inspect-js/is-arguments/commit/77b9ceae8dcb2c2e73d85f512d0d0309427c4011) +- Lock covert to v1.0.0. [`28d9052`](https://github.com/inspect-js/is-arguments/commit/28d9052eaa99f36ca5c61f35645b5e14ddf6f8f9) +- Updating tape [`d9ee2ac`](https://github.com/inspect-js/is-arguments/commit/d9ee2ac24045fa81ffed356410cfc2d878bc8b4b) +- Updating jscs [`c0cab8f`](https://github.com/inspect-js/is-arguments/commit/c0cab8fd6c0509153142a3cc79a7a4dceba322be) +- Updating jscs [`c59352a`](https://github.com/inspect-js/is-arguments/commit/c59352ae99c0d813168c19b9c888182ea11ae17a) +- Run linter as part of tests [`8b8154e`](https://github.com/inspect-js/is-arguments/commit/8b8154ef5b2566250baed70807affdbba93c3bcf) +- Oops, properly running code coverage checks during tests. [`cc441d0`](https://github.com/inspect-js/is-arguments/commit/cc441d0c488486c688e513f7d129f4f8ea2ee323) +- Updating covert. [`142db90`](https://github.com/inspect-js/is-arguments/commit/142db90aa3448995232c419419523b67a953b012) +- Updating tape [`265fd0f`](https://github.com/inspect-js/is-arguments/commit/265fd0ff3ee71ab8aa3d2d90be74066c1aa7c9c0) +- Updating tape [`7e9aec6`](https://github.com/inspect-js/is-arguments/commit/7e9aec654b8f5fe0bb2f8c940c84da8ec29a2102) +- Updating covert [`d96860a`](https://github.com/inspect-js/is-arguments/commit/d96860ab520ae62a37e80ad259b936ace09954d9) +- Updating tape [`1ec32a0`](https://github.com/inspect-js/is-arguments/commit/1ec32a0c02f53192a94521d63d4cf8fbb567fc84) +- Run code coverage as part of tests [`155ab22`](https://github.com/inspect-js/is-arguments/commit/155ab227902287c5eec653c25bec2cc4b530e635) +- Coverage does not work currently on node 0.6. [`9acf696`](https://github.com/inspect-js/is-arguments/commit/9acf696a1f3e202990fea494615377b40a380b79) +- Testing node 0.6 again [`a23ca07`](https://github.com/inspect-js/is-arguments/commit/a23ca07427cf3801b82e6a93d9a8904f392f4b20) + +## [v1.0.0](https://github.com/inspect-js/is-arguments/compare/v0.1.0...v1.0.0) - 2014-01-07 + +### Commits + +- :metal: 1.0.0 [`fc08874`](https://github.com/inspect-js/is-arguments/commit/fc08874107ac74fca91bd678843dbf7ea3a4c54a) + +## v0.1.0 - 2014-01-07 + +### Commits + +- package.json [`c547055`](https://github.com/inspect-js/is-arguments/commit/c54705585e907f1ef22473bff656904e49d22db2) +- read me! [`72ed639`](https://github.com/inspect-js/is-arguments/commit/72ed639c5db9c8732073ec1d30f14b493bb976da) +- Initial commit [`d2e0264`](https://github.com/inspect-js/is-arguments/commit/d2e0264bed7948b6c4f7bfde12ab351bffbf4cc1) +- Tests. [`032ed16`](https://github.com/inspect-js/is-arguments/commit/032ed16abf54466a75333e1da2ceef780fb58c1e) +- Implementation. [`71c312d`](https://github.com/inspect-js/is-arguments/commit/71c312d76d3b4b99cf7a1e0b442e9492069fba2b) +- Travis CI [`5500a66`](https://github.com/inspect-js/is-arguments/commit/5500a664de6b4484850f02b74641baa6e7d74c50) +- Running code coverage as part of tests. [`88ad34a`](https://github.com/inspect-js/is-arguments/commit/88ad34a133188cea28aa26a9f583653ea3a0260e) diff --git a/node_modules/is-arguments/LICENSE b/node_modules/is-arguments/LICENSE new file mode 100644 index 0000000000000..47b7b5078fce3 --- /dev/null +++ b/node_modules/is-arguments/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. diff --git a/node_modules/is-arguments/README.md b/node_modules/is-arguments/README.md new file mode 100644 index 0000000000000..b312512cce68b --- /dev/null +++ b/node_modules/is-arguments/README.md @@ -0,0 +1,47 @@ +# is-arguments [![Version Badge][2]][1] + +[![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] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this an arguments object? It's a harder question than you think. + +## Example + +```js +var isArguments = require('is-arguments'); +var assert = require('assert'); + +assert.equal(isArguments({}), false); +assert.equal(isArguments([]), false); +(function () { + assert.equal(isArguments(arguments), true); +}()) +``` + +## Caveats +If you have modified an actual `arguments` object by giving it a `Symbol.toStringTag` property, then this package will return `false`. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-arguments +[2]: https://versionbadg.es/inspect-js/is-arguments.svg +[5]: https://david-dm.org/inspect-js/is-arguments.svg +[6]: https://david-dm.org/inspect-js/is-arguments +[7]: https://david-dm.org/inspect-js/is-arguments/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-arguments#info=devDependencies +[11]: https://nodei.co/npm/is-arguments.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-arguments.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-arguments.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-arguments +[codecov-image]: https://codecov.io/gh/inspect-js/is-arguments/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-arguments/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-arguments +[actions-url]: https://github.com/inspect-js/is-arguments/actions diff --git a/node_modules/is-arguments/index.js b/node_modules/is-arguments/index.js new file mode 100644 index 0000000000000..e17e906cdaac5 --- /dev/null +++ b/node_modules/is-arguments/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var hasToStringTag = require('has-tostringtag/shams')(); +var callBound = require('call-bind/callBound'); + +var $toString = callBound('Object.prototype.toString'); + +var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { + return false; + } + return $toString(value) === '[object Arguments]'; +}; + +var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + $toString(value) !== '[object Array]' && + $toString(value.callee) === '[object Function]'; +}; + +var supportsStandardArguments = (function () { + return isStandardArguments(arguments); +}()); + +isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests + +module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; diff --git a/node_modules/is-arguments/package.json b/node_modules/is-arguments/package.json new file mode 100644 index 0000000000000..3774e2e22618b --- /dev/null +++ b/node_modules/is-arguments/package.json @@ -0,0 +1,116 @@ +{ + "_from": "is-arguments@^1.0.4", + "_id": "is-arguments@1.1.1", + "_inBundle": false, + "_integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "_location": "/is-arguments", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-arguments@^1.0.4", + "name": "is-arguments", + "escapedName": "is-arguments", + "rawSpec": "^1.0.4", + "saveSpec": null, + "fetchSpec": "^1.0.4" + }, + "_requiredBy": [ + "/deep-equal" + ], + "_resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "_shasum": "15b3f88fda01f2a97fec84ca761a560f123efa9b", + "_spec": "is-arguments@^1.0.4", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/deep-equal", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/inspect-js/is-arguments/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "deprecated": false, + "description": "Is this an arguments object? It's a harder question than you think.", + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^7.32.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/inspect-js/is-arguments", + "keywords": [ + "arguments", + "js", + "javascript", + "is-arguments", + "is", + "object" + ], + "license": "MIT", + "main": "index.js", + "name": "is-arguments", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-arguments.git" + }, + "scripts": { + "lint": "eslint .", + "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": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "testling": { + "files": "test.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.1.1" +} diff --git a/node_modules/is-arguments/test/index.js b/node_modules/is-arguments/test/index.js new file mode 100644 index 0000000000000..6d7cd5acea4bc --- /dev/null +++ b/node_modules/is-arguments/test/index.js @@ -0,0 +1,44 @@ +'use strict'; + +var test = require('tape'); +var isArguments = require('../'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('primitives', function (t) { + t.notOk(isArguments([]), 'array is not arguments'); + t.notOk(isArguments({}), 'object is not arguments'); + t.notOk(isArguments(''), 'empty string is not arguments'); + t.notOk(isArguments('foo'), 'string is not arguments'); + t.notOk(isArguments({ length: 2 }), 'naive array-like is not arguments'); + t.end(); +}); + +test('arguments object', function (t) { + t.ok(isArguments(arguments), 'arguments is arguments'); + t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); + t.end(); +}); + +test('old-style arguments object', function (t) { + var isLegacyArguments = isArguments.isLegacyArguments || isArguments; + var fakeOldArguments = { + callee: function () {}, + length: 3 + }; + t.ok(isLegacyArguments(fakeOldArguments), 'old-style arguments is arguments'); + t.end(); +}); + +test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { + var obj = {}; + obj[Symbol.toStringTag] = 'Arguments'; + t.notOk(isArguments(obj), 'object with faked toStringTag is not arguments'); + + var args = (function () { + return arguments; + }()); + args[Symbol.toStringTag] = 'Arguments'; + t.notOk(isArguments(obj), 'real arguments with faked toStringTag is not arguments'); + + t.end(); +}); diff --git a/node_modules/object-is/.eslintignore b/node_modules/object-is/.eslintignore new file mode 100644 index 0000000000000..404abb22121cd --- /dev/null +++ b/node_modules/object-is/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/object-is/.nycrc b/node_modules/object-is/.nycrc new file mode 100644 index 0000000000000..1826526e091b8 --- /dev/null +++ b/node_modules/object-is/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/object-is/CHANGELOG.md b/node_modules/object-is/CHANGELOG.md new file mode 100644 index 0000000000000..294c68c012bb6 --- /dev/null +++ b/node_modules/object-is/CHANGELOG.md @@ -0,0 +1,150 @@ +# 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). + +## [v1.1.5](https://github.com/es-shims/object-is/compare/v1.1.4...v1.1.5) - 2021-02-20 + +### Commits + +- [meta] do not publish github action workflow files [`ec00b0f`](https://github.com/es-shims/object-is/commit/ec00b0f3a5096a7d57884e201c76ded3052a1b9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`279645e`](https://github.com/es-shims/object-is/commit/279645e330da410da9776455274aa6b3c89b585b) +- [actions] update workflows [`6b4ef5a`](https://github.com/es-shims/object-is/commit/6b4ef5a219fc3982433fc3df2ad9d57994be0761) +- [Dev Deps] update `eslint`, `functions-have-names`, `tape` [`f5fd32a`](https://github.com/es-shims/object-is/commit/f5fd32ace61d4643fe0bf67ca83a6674a65906be) +- [Deps] update `call-bind` [`0fafc13`](https://github.com/es-shims/object-is/commit/0fafc13ec1a20d3075512ae9d2c0b0ee252169a9) +- [Deps] update `call-bind` [`e28a929`](https://github.com/es-shims/object-is/commit/e28a929b71fc1939a4c4d5c92ca0c04a0b27ff81) +- [readme] Add note about es-shim API [`f903cc1`](https://github.com/es-shims/object-is/commit/f903cc11186e0d5c6c4173821d6b7bf2a49f6c01) + +## [v1.1.4](https://github.com/es-shims/object-is/compare/v1.1.3...v1.1.4) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`958ab26`](https://github.com/es-shims/object-is/commit/958ab266fd68396781c076d8a5ee4ba292561362) +- [Tests] add `shimmed` and `implementation` and `index` tests; run `es-shim-api` in postlint; use `tape` runner [`b918fb8`](https://github.com/es-shims/object-is/commit/b918fb849023032d2da61ead95f31b0a03371131) +- [Tests] run `nyc` on all tests [`8f62816`](https://github.com/es-shims/object-is/commit/8f6281683ad58ffe9b5809c2a9e7bb65db344c9c) +- [actions] add "Allow Edits" workflow [`aa419f0`](https://github.com/es-shims/object-is/commit/aa419f0ea2b497844365f9f51a746fa2a57bb6ee) +- [Deps] use `call-bind` instead of `es-abstract` [`4991728`](https://github.com/es-shims/object-is/commit/49917288eddfce31949f5a3351f0e0bb67929a2b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`3ce2ef5`](https://github.com/es-shims/object-is/commit/3ce2ef5e834bf22566ea5741178cd76bb35f8a89) +- [meta] ignore coverage output [`d778383`](https://github.com/es-shims/object-is/commit/d778383fde9222bc5349dd4adcaab9f5ef10254e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`e0d9b41`](https://github.com/es-shims/object-is/commit/e0d9b41a73f51f1c8b9d9b402da5f754926bc280) + +## [v1.1.3](https://github.com/es-shims/object-is/compare/v1.1.2...v1.1.3) - 2020-09-30 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`6f1217f`](https://github.com/es-shims/object-is/commit/6f1217fc82cbe25d3911cad2d3298a8f3f51bd7f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog` [`68d8ab0`](https://github.com/es-shims/object-is/commit/68d8ab07275949aa78f20f0e6270c0a26aba2647) +- [Deps] update `es-abstract` [`d665d57`](https://github.com/es-shims/object-is/commit/d665d570e416f039bbbc577f0c2c77104302d227) +- [Deps] update `es-abstract` [`61b4d08`](https://github.com/es-shims/object-is/commit/61b4d0893212b08ec89ba8c388948fa4377f7a43) + +## [v1.1.2](https://github.com/es-shims/object-is/compare/v1.1.1...v1.1.2) - 2020-04-14 + +### Commits + +- [Fix] avoid mutating the builtin `Object.is` in the main entry point [`5988702`](https://github.com/es-shims/object-is/commit/59887020544021d7cf8e72cd84c4d67abcf558c5) + +## [v1.1.1](https://github.com/es-shims/object-is/compare/v1.1.0...v1.1.1) - 2020-04-14 + +### Fixed + +- [Deps] add missing `define-properties` [`#10`](https://github.com/es-shims/object-is/issues/10) + +## [v1.1.0](https://github.com/es-shims/object-is/compare/v1.0.2...v1.1.0) - 2020-04-14 + +### Commits + +- [New] convert to `es-shim-api` interface [`c8b6e9f`](https://github.com/es-shims/object-is/commit/c8b6e9f249438bfd9dfa315415eddd3a1d436d15) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`222a2a9`](https://github.com/es-shims/object-is/commit/222a2a9a2eb08be844bf4c619d1eb711d743c6f3) +- [Dev Deps] update `auto-changelog`, `tape` [`1ea6a92`](https://github.com/es-shims/object-is/commit/1ea6a92153695074c4e3f2e2e0ec26b83f6b091a) +- [Dev Deps] update `auto-changelog`; add `aud` [`1d129e0`](https://github.com/es-shims/object-is/commit/1d129e0dfe386a1e39fa4f3ff991198e885299b1) +- [Tests] only audit prod deps [`ad12386`](https://github.com/es-shims/object-is/commit/ad1238688dcfe9170217b6b9a02122369979d221) + +## [v1.0.2](https://github.com/es-shims/object-is/compare/v1.0.1...v1.0.2) - 2019-12-15 + +### Commits + +- [Tests] use shared travis-ci configs [`eb56ddf`](https://github.com/es-shims/object-is/commit/eb56ddf82bd08f56bd50db7333f2a7b6cef2452a) +- [Tests] up to `node` `v12.6`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `v5.12`, `4.9`; use `nvm install-latest-npm` [`a5bb4e3`](https://github.com/es-shims/object-is/commit/a5bb4e3663902dda4eb9c748aecd04532428594a) +- [Tests] remove `jscs` [`1929690`](https://github.com/es-shims/object-is/commit/19296907bbb9864518ccb2364a44f9adda9c910c) +- Using my standard jscs.json file. [`a7621dc`](https://github.com/es-shims/object-is/commit/a7621dcafbdf4befa4bb97c4e132f30fd486addf) +- [meta] run `auto-changelog` [`5c551c4`](https://github.com/es-shims/object-is/commit/5c551c406f8a72d53f8f4bbabc89f0c1892bf262) +- Update `tape`, `covert`, `jscs` [`bd84112`](https://github.com/es-shims/object-is/commit/bd8411263e754f5a464b6d55c01ecd3b1f4c7437) +- [meta] move repo to es-shims org [`15d3cdc`](https://github.com/es-shims/object-is/commit/15d3cdcbd4b78c8dee80507ac8a5f4cff7ab42d4) +- Test up to `io.js` `v2.2` [`d1d2de4`](https://github.com/es-shims/object-is/commit/d1d2de48f72853552e3d3a751b3f178c5dc10ef5) +- Update `tape`, `jscs` [`b40e85f`](https://github.com/es-shims/object-is/commit/b40e85f77cc906fc54246cf672a78b902bd65aab) +- Add `npm run eslint` [`a80ee81`](https://github.com/es-shims/object-is/commit/a80ee81d12d8fb4120bf590c4d4622fb5dc3f67b) +- Only apps should have lockfiles [`f70677a`](https://github.com/es-shims/object-is/commit/f70677adbe0a765ee26e214a95a97d0ddf88f31e) +- [actions] add automatic rebasing / merge commit blocking [`27780d3`](https://github.com/es-shims/object-is/commit/27780d330cbaf3ef96479b5a0a3fe55f71b54bb6) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`cf886ce`](https://github.com/es-shims/object-is/commit/cf886ced70afff6c5a66be6f9ddba2d330034c70) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols` [`b70e146`](https://github.com/es-shims/object-is/commit/b70e146496488ac5e1a48651cb94292e67051e48) +- [meta] add version scripts [`25a5308`](https://github.com/es-shims/object-is/commit/25a5308bfcc41733a86ce0461ef69a2459215b5b) +- [Tests] up to `node` `v12.10` [`b6e934c`](https://github.com/es-shims/object-is/commit/b6e934ca8f0e65dac7ed3c30b2b7907d39e36f6b) +- [Dev Deps] update `tape`, `jscs` [`df38b5a`](https://github.com/es-shims/object-is/commit/df38b5a856071aaa4d6b8e089a48d80775cb1ed9) +- Adding license and downloads badges [`c743f09`](https://github.com/es-shims/object-is/commit/c743f0907b0bab73a0821541190a865a5c3e5da9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`41d1c5b`](https://github.com/es-shims/object-is/commit/41d1c5b8173f6543e01940b18daee93c586058d0) +- Add tests for Symbols. [`8189ca7`](https://github.com/es-shims/object-is/commit/8189ca73b647a13f63162bc8ed14040386972530) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`698c449`](https://github.com/es-shims/object-is/commit/698c449a8fdc6634747765333cdd8071119932b8) +- Add `npm run security` [`1fe530a`](https://github.com/es-shims/object-is/commit/1fe530abd3164eb70dedd959a25f3b1ad0d02c01) +- Test up to `io.js` `v3.0` [`cd6ac03`](https://github.com/es-shims/object-is/commit/cd6ac034cda66916319c68aeea190e5817de106c) +- [Refactor] no-else-return [`a590382`](https://github.com/es-shims/object-is/commit/a590382d69134915f37039ae6841c9fffbdd5b81) +- [docs] clean up some links [`422df90`](https://github.com/es-shims/object-is/commit/422df90523f4d7f2463e404d394f656232f0fc7c) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`8684418`](https://github.com/es-shims/object-is/commit/8684418131004859fe18443d4f57f28510b72e13) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`6b618ac`](https://github.com/es-shims/object-is/commit/6b618acfa5bcab8d1684d926728000afb4f1ee52) +- [readme] prefer ES2015 over ES6 [`9aae9f9`](https://github.com/es-shims/object-is/commit/9aae9f9d1b4e699364f4822534b89887abb9089f) +- [meta] use keepachangelog with auto-changelog [`3abdcd9`](https://github.com/es-shims/object-is/commit/3abdcd915bc647a5f01af2422fa4a37b2980f946) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`65da8bb`](https://github.com/es-shims/object-is/commit/65da8bba76d4b0e95f95d2a6b98d7bfe5b294ff0) +- [Tests] use `has-symbols` [`9c88ec7`](https://github.com/es-shims/object-is/commit/9c88ec729227f35dc18fe52131c11afd296a042e) +- Update `tape`, `jscs` [`abc6021`](https://github.com/es-shims/object-is/commit/abc6021a0be38921688182e0f95376597056f6cd) +- Update `jscs` [`f85f0ba`](https://github.com/es-shims/object-is/commit/f85f0ba49809030c09dfda4af0022c4122438f90) +- Update `tape`, `jscs` [`9c8b28b`](https://github.com/es-shims/object-is/commit/9c8b28bf52521b70fdacdaba1035e101aa0a1240) +- Using single quotes. [`46a566e`](https://github.com/es-shims/object-is/commit/46a566efbc6366aa44ef9ac8b47668ede5830d50) +- [meta] add `funding` field [`f71e665`](https://github.com/es-shims/object-is/commit/f71e66510676f9bfeb6e81a05821161953879270) +- [Dev Deps] update `tape` [`694a94e`](https://github.com/es-shims/object-is/commit/694a94e83b4d415b1e43adb8011ad33351945105) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`4b29a71`](https://github.com/es-shims/object-is/commit/4b29a718b459ecde3512c4dd6577a2a5e95b7cc6) +- Update `jscs` [`204e6fe`](https://github.com/es-shims/object-is/commit/204e6febc368ca94091ac0b5ec0254c33b0ee462) +- Lock covert to v1.0.0. [`efc5a21`](https://github.com/es-shims/object-is/commit/efc5a21e1d0cc463ec7c7ef2f75a317085093d5e) +- Updating tape [`d1ff721`](https://github.com/es-shims/object-is/commit/d1ff721d2bdec538112cdbbfedcf06d578093831) +- Updating jscs [`35b4df9`](https://github.com/es-shims/object-is/commit/35b4df90d0c97a4f004f0188940b2e602b645c16) +- Updating jscs [`46c3b9d`](https://github.com/es-shims/object-is/commit/46c3b9d31a7f8ce43c496e0304b22ce142311917) +- Updating jscs [`75c9b8b`](https://github.com/es-shims/object-is/commit/75c9b8b45022d5e9b44b0c9a055974185b550a57) + +## [v1.0.1](https://github.com/es-shims/object-is/compare/v1.0.0...v1.0.1) - 2014-08-27 + +### Merged + +- Use svg instead of png to get better image quality [`#2`](https://github.com/es-shims/object-is/pull/2) + +### Commits + +- Adding `npm run lint` [`af5dedd`](https://github.com/es-shims/object-is/commit/af5dedd2f40df7584c856576123a2d2852dd9694) +- Using an easier isNaN check [`89474ae`](https://github.com/es-shims/object-is/commit/89474ae3e26eb857d89b01c1f3b20f859bd0f161) +- Oops, run quiet coverage as part of tests [`5149e18`](https://github.com/es-shims/object-is/commit/5149e1876808e67a016fd913f6d99481bf7091f2) +- Run linter as part of tests [`d5eee8a`](https://github.com/es-shims/object-is/commit/d5eee8a43b95c619cf3b06ef3d64cefc865f33f3) +- Updating covert [`0b862da`](https://github.com/es-shims/object-is/commit/0b862dad7873b9aab74d2f4262b5b587120c169b) +- Updating tape [`484e6ca`](https://github.com/es-shims/object-is/commit/484e6cab0d5734b8c9f23ceada58e93b09dc15ee) + +## [v1.0.0](https://github.com/es-shims/object-is/compare/v0.0.0...v1.0.0) - 2014-08-01 + +### Commits + +- Make sure old and unstable nodes don't break Travis [`c8d3dfe`](https://github.com/es-shims/object-is/commit/c8d3dfe4c0f6dc76a5b0cc22a6a6401fa1105cea) +- Bumping to v1.0.0. [`8811835`](https://github.com/es-shims/object-is/commit/8811835bff203cf0dc0dee1342beeb749ea63e10) +- Updating tape [`0767579`](https://github.com/es-shims/object-is/commit/0767579b3cbf59e49c73c131186bfcbad4448020) +- Updating covert [`6b67a0b`](https://github.com/es-shims/object-is/commit/6b67a0b4b6933ea23c74c24037f3f515942a005a) +- Run code coverage in tests [`8b5d70d`](https://github.com/es-shims/object-is/commit/8b5d70d9cbf6194d69ee22b8433fe4e0a3d7507e) +- Updating tape [`57b019c`](https://github.com/es-shims/object-is/commit/57b019c8b74030601dc71dc38cd2c41cf5b735d4) +- Updating tape [`91d94f9`](https://github.com/es-shims/object-is/commit/91d94f9b06c4a86942b077979536a8c2994ab374) + +## v0.0.0 - 2014-02-17 + +### Commits + +- package.json [`b724e50`](https://github.com/es-shims/object-is/commit/b724e50ea4a151f46ff5344f9dc3f00d48e60695) +- read me [`62470f5`](https://github.com/es-shims/object-is/commit/62470f58dbef4ba0b96c6c000b2802e328c54be6) +- Tests. [`639e212`](https://github.com/es-shims/object-is/commit/639e212c478afcb8c9a24753aa8fc2b2fdcfb925) +- Initial commit [`8e95b37`](https://github.com/es-shims/object-is/commit/8e95b3744c07594c49372c5732d96235f0b7d9d6) +- Implementation. [`47780bc`](https://github.com/es-shims/object-is/commit/47780bc0f483eeabd853877fa33295976cf201ae) +- Travis CI [`baaf8c7`](https://github.com/es-shims/object-is/commit/baaf8c70bc7fd88cf149af9b0c992febb5e89514) +- Covert is broken in node 0.6 [`ee040b2`](https://github.com/es-shims/object-is/commit/ee040b2f3a917da9a33a287daf8470e95db271e1) diff --git a/node_modules/object-is/LICENSE b/node_modules/object-is/LICENSE new file mode 100644 index 0000000000000..47b7b5078fce3 --- /dev/null +++ b/node_modules/object-is/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 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. diff --git a/node_modules/object-is/README.md b/node_modules/object-is/README.md new file mode 100644 index 0000000000000..b028e89e22ab5 --- /dev/null +++ b/node_modules/object-is/README.md @@ -0,0 +1,60 @@ +#object-is [![Version Badge][2]][1] + +[![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] + +ES2015-compliant shim for Object.is - differentiates between -0 and +0, and can compare to NaN. + +Essentially, Object.is returns the same value as === - but true for NaN, and false for -0 and +0. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/ecma262). + +## Example + +```js +Object.is = require('object-is'); +var assert = require('assert'); + +assert.ok(Object.is()); +assert.ok(Object.is(undefined)); +assert.ok(Object.is(undefined, undefined)); +assert.ok(Object.is(null, null)); +assert.ok(Object.is(true, true)); +assert.ok(Object.is(false, false)); +assert.ok(Object.is('foo', 'foo')); + +var arr = [1, 2]; +assert.ok(Object.is(arr, arr)); +assert.notOk(Object.is(arr, [1, 2])); + +assert.ok(Object.is(0, 0)); +assert.ok(Object.is(-0, -0)); +assert.notOk(Object.is(0, -0)); + +assert.ok(Object.is(NaN, NaN)); +assert.ok(Object.is(Infinity, Infinity)); +assert.ok(Object.is(-Infinity, -Infinity)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/object-is +[2]: http://versionbadg.es/es-shims/object-is.svg +[3]: https://travis-ci.org/es-shims/object-is.svg +[4]: https://travis-ci.org/es-shims/object-is +[5]: https://david-dm.org/es-shims/object-is.svg +[6]: https://david-dm.org/es-shims/object-is +[7]: https://david-dm.org/es-shims/object-is/dev-status.svg +[8]: https://david-dm.org/es-shims/object-is#info=devDependencies +[11]: https://nodei.co/npm/object-is.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-is.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-is.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-is + diff --git a/node_modules/object-is/auto.js b/node_modules/object-is/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/object-is/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/object-is/implementation.js b/node_modules/object-is/implementation.js new file mode 100644 index 0000000000000..7b3a5652ef6aa --- /dev/null +++ b/node_modules/object-is/implementation.js @@ -0,0 +1,19 @@ +'use strict'; + +var numberIsNaN = function (value) { + return value !== value; +}; + +module.exports = function is(a, b) { + if (a === 0 && b === 0) { + return 1 / a === 1 / b; + } + if (a === b) { + return true; + } + if (numberIsNaN(a) && numberIsNaN(b)) { + return true; + } + return false; +}; + diff --git a/node_modules/object-is/index.js b/node_modules/object-is/index.js new file mode 100644 index 0000000000000..abf0449c95466 --- /dev/null +++ b/node_modules/object-is/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = callBind(getPolyfill(), Object); + +define(polyfill, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = polyfill; diff --git a/node_modules/object-is/package.json b/node_modules/object-is/package.json new file mode 100644 index 0000000000000..a151fc168d433 --- /dev/null +++ b/node_modules/object-is/package.json @@ -0,0 +1,114 @@ +{ + "_from": "object-is@^1.0.1", + "_id": "object-is@1.1.5", + "_inBundle": false, + "_integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "_location": "/object-is", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "object-is@^1.0.1", + "name": "object-is", + "escapedName": "object-is", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/deep-equal" + ], + "_resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "_shasum": "b9deeaa5fc7f1846a0faecdceec138e5778f53ac", + "_spec": "object-is@^1.0.1", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/deep-equal", + "author": { + "name": "Jordan Harband" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/es-shims/object-is/issues" + }, + "bundleDependencies": false, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "deprecated": false, + "description": "ES2015-compliant shim for Object.is - differentiates between -0 and +0", + "devDependencies": { + "@es-shims/api": "^2.1.2", + "@ljharb/eslint-config": "^17.5.1", + "aud": "^1.1.4", + "auto-changelog": "^2.2.1", + "eslint": "^7.20.0", + "functions-have-names": "^1.2.2", + "has-symbols": "^1.0.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.2.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/es-shims/object-is", + "keywords": [ + "is", + "Object.is", + "equality", + "sameValueZero", + "ES6", + "ES2015", + "shim", + "polyfill", + "es-shim API" + ], + "license": "MIT", + "main": "index.js", + "name": "object-is", + "repository": { + "type": "git", + "url": "git://github.com/es-shims/object-is.git" + }, + "scripts": { + "lint": "eslint .", + "postlint": "es-shim-api --bound", + "posttest": "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", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "testling": { + "files": "test.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..12.0", + "opera/15.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "version": "1.1.5" +} diff --git a/node_modules/object-is/polyfill.js b/node_modules/object-is/polyfill.js new file mode 100644 index 0000000000000..96cd58a48e46e --- /dev/null +++ b/node_modules/object-is/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return typeof Object.is === 'function' ? Object.is : implementation; +}; diff --git a/node_modules/object-is/shim.js b/node_modules/object-is/shim.js new file mode 100644 index 0000000000000..e6650d3850232 --- /dev/null +++ b/node_modules/object-is/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var getPolyfill = require('./polyfill'); +var define = require('define-properties'); + +module.exports = function shimObjectIs() { + var polyfill = getPolyfill(); + define(Object, { is: polyfill }, { + is: function testObjectIs() { + return Object.is !== polyfill; + } + }); + return polyfill; +}; diff --git a/node_modules/object-is/test/implementation.js b/node_modules/object-is/test/implementation.js new file mode 100644 index 0000000000000..76de8be564660 --- /dev/null +++ b/node_modules/object-is/test/implementation.js @@ -0,0 +1,12 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + runTests(callBind(implementation, Object), t); + + t.end(); +}); diff --git a/node_modules/object-is/test/index.js b/node_modules/object-is/test/index.js new file mode 100644 index 0000000000000..39f34b3071732 --- /dev/null +++ b/node_modules/object-is/test/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var index = require('../'); +var test = require('tape'); + +var runTests = require('./tests'); + +test('as a function', function (t) { + runTests(index, t); + + t.end(); +}); diff --git a/node_modules/object-is/test/shimmed.js b/node_modules/object-is/test/shimmed.js new file mode 100644 index 0000000000000..eb8de97149166 --- /dev/null +++ b/node_modules/object-is/test/shimmed.js @@ -0,0 +1,28 @@ +'use strict'; + +require('../auto'); + +var runTests = require('./tests'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); + +test('shimmed', function (t) { + t.equal(Object.is.length, 2, 'Object.is has a length of 2'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.is.name, 'is', 'Object.is has name "is"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'is'), 'Object.is is not enumerable'); + et.end(); + }); + + runTests(callBind(Object.is, Object), t); + + t.end(); +}); diff --git a/node_modules/object-is/test/tests.js b/node_modules/object-is/test/tests.js new file mode 100644 index 0000000000000..c9af9f27ff166 --- /dev/null +++ b/node_modules/object-is/test/tests.js @@ -0,0 +1,57 @@ +'use strict'; + +var hasSymbols = require('has-symbols')(); + +module.exports = function runTests(is, t) { + t.test('works with primitives', function (st) { + st.ok(is(), 'two absent args are the same'); + st.ok(is(undefined), 'undefined & one absent arg are the same'); + st.ok(is(undefined, undefined), 'undefined is undefined'); + st.ok(is(null, null), 'null is null'); + st.ok(is(true, true), 'true is true'); + st.ok(is(false, false), 'false is false'); + st.notOk(is(true, false), 'true is not false'); + st.end(); + }); + + t.test('works with NaN', function (st) { + st.ok(is(NaN, NaN), 'NaN is NaN'); + st.end(); + }); + + t.test('differentiates zeroes', function (st) { + st.ok(is(0, 0), '+0 is +0'); + st.ok(is(-0, -0), '-0 is -0'); + st.notOk(is(0, -0), '+0 is not -0'); + st.end(); + }); + + t.test('nonzero numbers', function (st) { + st.ok(is(Infinity, Infinity), 'infinity is infinity'); + st.ok(is(-Infinity, -Infinity), 'infinity is infinity'); + st.ok(is(42, 42), '42 is 42'); + st.notOk(is(42, -42), '42 is not -42'); + st.end(); + }); + + t.test('strings', function (st) { + st.ok(is('', ''), 'empty string is empty string'); + st.ok(is('foo', 'foo'), 'string is string'); + st.notOk(is('foo', 'bar'), 'string is not different string'); + st.end(); + }); + + t.test('objects', function (st) { + var obj = {}; + st.ok(is(obj, obj), 'object is same object'); + st.notOk(is(obj, {}), 'object is not different object'); + st.end(); + }); + + t.test('Symbols', { skip: !hasSymbols }, function (st) { + st.ok(is(Symbol.iterator, Symbol.iterator), 'Symbol.iterator is itself'); + st.notOk(is(Symbol(), Symbol()), 'different Symbols are not equal'); + st.notOk(is(Symbol.iterator, Object(Symbol.iterator)), 'Symbol.iterator is not boxed form of itself'); + st.end(); + }); +}; diff --git a/node_modules/regexp.prototype.flags/.editorconfig b/node_modules/regexp.prototype.flags/.editorconfig new file mode 100644 index 0000000000000..eaa214161f5cd --- /dev/null +++ b/node_modules/regexp.prototype.flags/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/regexp.prototype.flags/.nycrc b/node_modules/regexp.prototype.flags/.nycrc new file mode 100644 index 0000000000000..bdd626ce91477 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/regexp.prototype.flags/CHANGELOG.md b/node_modules/regexp.prototype.flags/CHANGELOG.md new file mode 100644 index 0000000000000..f7bf7b82ef1e1 --- /dev/null +++ b/node_modules/regexp.prototype.flags/CHANGELOG.md @@ -0,0 +1,190 @@ +# 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). + +## [v1.4.3](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.2...v1.4.3) - 2022-04-14 + +### Commits + +- [Fix] when shimmed, name must be `get flags` [`fcefd00`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcefd0039177e9cbcb2ed842d353131ace7a3377) + +## [v1.4.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.1...v1.4.2) - 2022-04-12 + +### Commits + +- [Fix] ensure `hasIndices` is patched properly, and getter order is correct [`a1af45a`](https://github.com/es-shims/RegExp.prototype.flags/commit/a1af45a8a6f7305b097b83f96ee9fc45abb3e733) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`24f5a0c`](https://github.com/es-shims/RegExp.prototype.flags/commit/24f5a0c84f2e7d263ae0e2008def870afd6d5a4f) + +## [v1.4.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.0...v1.4.1) - 2022-01-13 + +### Commits + +- [Fix] `polyfill`: do not throw in a descriptorless environment [`e2d24e7`](https://github.com/es-shims/RegExp.prototype.flags/commit/e2d24e707a44d958a0b6d3a114effb2f2b475337) + +## [v1.4.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.2...v1.4.0) - 2022-01-13 + +### Commits + +- [Tests] use `available-regexp-flags` [`95af246`](https://github.com/es-shims/RegExp.prototype.flags/commit/95af2463f1373282087528f8566e20ffae26c3db) +- [New] add `hasIndices`/`d` flag [`89959ca`](https://github.com/es-shims/RegExp.prototype.flags/commit/89959ca1128ea48dcd0ec1416355264425fa3bc5) + +## [v1.3.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.1...v1.3.2) - 2022-01-13 + +### Commits + +- [actions] reuse common workflows [`6665b5d`](https://github.com/es-shims/RegExp.prototype.flags/commit/6665b5db7c45ce6b987d08ebaf6d2767eec95b94) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`babce94`](https://github.com/es-shims/RegExp.prototype.flags/commit/babce94b5ca96e93e74e384c0a01295943677a3f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `object-inspect`, `safe-publish-latest`, `tape` [`52132d9`](https://github.com/es-shims/RegExp.prototype.flags/commit/52132d9f3df904864d4cf3fd44892ee563aee524) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c16687c`](https://github.com/es-shims/RegExp.prototype.flags/commit/c16687c118d374d8997a8d885467507bf943b4bc) +- [actions] update codecov uploader [`0a3c904`](https://github.com/es-shims/RegExp.prototype.flags/commit/0a3c904a9fd1247b3b8e0fb6b451b3fbe97735bd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`3fce7f2`](https://github.com/es-shims/RegExp.prototype.flags/commit/3fce7f27c753440003675d03ae9a7ecfa6a74d30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`75ca498`](https://github.com/es-shims/RegExp.prototype.flags/commit/75ca49889349fc42e51ea79b2ec7a1996fb3eb18) +- [actions] update workflows [`300f321`](https://github.com/es-shims/RegExp.prototype.flags/commit/300f321984526066656bec791f0bb3861b33cfbc) +- [meta] better `eccheck` command [`5f735ab`](https://github.com/es-shims/RegExp.prototype.flags/commit/5f735ab1b1c87dbd05c0096249160587f166cd51) +- [Dev Deps] update `eslint`, `tape` [`3059637`](https://github.com/es-shims/RegExp.prototype.flags/commit/3059637210eb5c9fa97160ec2f0aea1d1d724eb7) +- [actions] update workflows` [`dbd8ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/dbd8ab49fa2196dd74791107825c43e4481cdfd2) +- [meta] use `prepublishOnly` script for npm 7+ [`5cc8652`](https://github.com/es-shims/RegExp.prototype.flags/commit/5cc86524a41bf358b6701bcf46e480f0e3e470b4) +- [Fix] use polyfill, not implementation, in main export [`15ab4b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/15ab4b85f3904e48664e26394dc12765ed666da4) +- [meta] remove `audit-level` config, which breaks npm 7 installs [`1cb98ae`](https://github.com/es-shims/RegExp.prototype.flags/commit/1cb98aed731e73d11df5ed3b853b371d35a69f5a) + +## [v1.3.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.0...v1.3.1) - 2021-01-15 + +### Commits + +- [Tests] run `nyc` on all tests; use `tape` runner; add full es-shims test suite [`047a1e8`](https://github.com/es-shims/RegExp.prototype.flags/commit/047a1e8ff250220254b0e9598d962a56c8ec3ffc) +- [Tests] migrate tests to Github Actions [`e4e391f`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4e391fd3e6f057172994ad0c33ca128568c0b06) +- [meta] use `auto-changelog` for changelog [`afbcd06`](https://github.com/es-shims/RegExp.prototype.flags/commit/afbcd06402e97e975af797e2c1375e35e22e90f2) +- [actions] add Require Allow Edits workflow [`0db5d50`](https://github.com/es-shims/RegExp.prototype.flags/commit/0db5d50cdf59e3e5529024af4f8ce05829edc06d) +- [meta] do not publish github action workflow files [`53f2902`](https://github.com/es-shims/RegExp.prototype.flags/commit/53f29020e5a1f517e91b8cf226ed6bc97eadc090) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `aud` [`05f2a85`](https://github.com/es-shims/RegExp.prototype.flags/commit/05f2a851869069c7911176809028be8491465f86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2a197b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a197b84916f094946c5cad56ef8e7bb7e8f12ac) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`e40bd37`](https://github.com/es-shims/RegExp.prototype.flags/commit/e40bd37de9bb756672832a6c994652965d09b9ae) +- [Refactor] use `call-bind` instead of `es-abstract` [`e6eac90`](https://github.com/es-shims/RegExp.prototype.flags/commit/e6eac9052ebdb4bc28cb83b5d3017a4ed74fe3f1) +- [Deps] update `es-abstract` [`f198075`](https://github.com/es-shims/RegExp.prototype.flags/commit/f198075d6fc075e0d98967af98a512742e6e7e4f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d21727`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d217275d78214b82c7f5cacca85ca2308df83f1) +- [Deps] update `es-abstract` [`7e7ddc6`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e7ddc66174256f6688a857b09c9a02bafcf4866) + +## [v1.3.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.2.0...v1.3.0) - 2019-12-14 + +### Commits + +- [Tests] remove `jscs` [`4a09ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a09ab467f62065a1718b0dcc50f7818b5400ab6) +- [Tests] use shared travis-ci configs [`8afa6a9`](https://github.com/es-shims/RegExp.prototype.flags/commit/8afa6a99fd35c19fb49ba630fd17159a5da2a34e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `has`, `tape` [`13a9fc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/13a9fc9d6bc2600681eb3f638668beccf80b843c) +- [Refactor] use `callBind` helper from `es-abstract` [`c3a3727`](https://github.com/es-shims/RegExp.prototype.flags/commit/c3a37276764d99c1e4f7e9467ad636fce8c92c58) +- [actions] add automatic rebasing / merge commit blocking [`51e3f93`](https://github.com/es-shims/RegExp.prototype.flags/commit/51e3f9366d15a07edaf532884948ce74b6827125) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`7e1ee50`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e1ee505df374867c2c04d500aa1c36265161b6f) +- [meta] add `funding` field [`c99cbec`](https://github.com/es-shims/RegExp.prototype.flags/commit/c99cbec1af9b0e0be42e82f164adacf2e1bdee16) +- [New] add `auto` entry point [`1e53e85`](https://github.com/es-shims/RegExp.prototype.flags/commit/1e53e854f663472e74dd0350e0c095df9c2b9c7b) +- [Tests] use `eclint` instead of `editorconfig-tools` [`8600bfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8600bfed42ab8d294463df482874c344fc079f82) +- [Deps] update `define-properties` [`ad221fa`](https://github.com/es-shims/RegExp.prototype.flags/commit/ad221fa2a26a9c2bc8d274b689cf7a626b58f4e9) + +## [v1.2.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.1...v1.2.0) - 2017-10-24 + +### Commits + +- [Tests] up to `node` `v8.8`, `v7.10`, `v6.11`, `v4.8`; improve matrix; use `nvm install-latest-npm` so new npm doesn’t break old node [`5a9653d`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a9653d1904eb8ad8baffe43cd065b6f36013e5a) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`; add `has` [`556de86`](https://github.com/es-shims/RegExp.prototype.flags/commit/556de8632bbe7a23279717f7d0b6ee841514fbe1) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`726772c`](https://github.com/es-shims/RegExp.prototype.flags/commit/726772c054a499ab7680823c4bd8fa9b048d9420) +- [New] add support for `dotAll` regex flag. [`fcbd64f`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcbd64f84fd974d98384bdb093bf25656eb72e8f) +- [Dev Deps] update `eslint`, `jscs`, `nsp`, `tape`, `@ljharb/eslint-config`, `@es-shims/api` [`0272934`](https://github.com/es-shims/RegExp.prototype.flags/commit/02729344addadc105b9c5e12d90cca85a75d16d6) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`e4cd264`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4cd264f4afa33ff865325b04791de95696e3ae4) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`baf5169`](https://github.com/es-shims/RegExp.prototype.flags/commit/baf51698ac00b31b6a4a6d5646a183a409ad1118) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`97cea15`](https://github.com/es-shims/RegExp.prototype.flags/commit/97cea152c20bb0e63e9c5111780f7b4af5d1a0e8) +- [Dev Deps] update `tape`, `discs`, `eslint`, `@ljharb/eslint-config` [`b6872f4`](https://github.com/es-shims/RegExp.prototype.flags/commit/b6872f44c833f6f7faf63881657208b6cd43ef49) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`14702cc`](https://github.com/es-shims/RegExp.prototype.flags/commit/14702ccd050029d4e6ea2e59d0912e6bfc16ffc0) +- [Dev Deps] update `jscs`, `@es-shims/api` [`cd060a6`](https://github.com/es-shims/RegExp.prototype.flags/commit/cd060a650db019be5244e1c1b77a29f6d79c89db) +- [Tests] up to `node` `v6.2`, `v5.11` [`14638bd`](https://github.com/es-shims/RegExp.prototype.flags/commit/14638bdbd62d6b6a7c89efb8ec57a7815032b4bb) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`b0a5ffb`](https://github.com/es-shims/RegExp.prototype.flags/commit/b0a5ffb25a76783053652e0d7f835e354f9b29b6) +- [Tests] npm run silently [`35804d4`](https://github.com/es-shims/RegExp.prototype.flags/commit/35804d45dd7f57faab923aaab914e6390813e700) +- [Tests] up to `node` `v5.9`, `v4.4` [`e0fe80d`](https://github.com/es-shims/RegExp.prototype.flags/commit/e0fe80d96783820444d6dea1e6b5739032a50c1b) +- [Tests] up to `node` `v5.7`, `v4.3` [`9739c42`](https://github.com/es-shims/RegExp.prototype.flags/commit/9739c422523571cc439d73a9ecaf5dc2e2643bec) +- [Dev Deps] update `jscs` [`4aa1699`](https://github.com/es-shims/RegExp.prototype.flags/commit/4aa1699a0582b7739f14c6cd8d5ae1a4515bd604) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `@ljharb/eslint-config` [`8bc5e6b`](https://github.com/es-shims/RegExp.prototype.flags/commit/8bc5e6ba5befc8f399e00f3c2d064519457fb57c) +- [Tests] fix npm upgrades on older nodes [`ae00bb9`](https://github.com/es-shims/RegExp.prototype.flags/commit/ae00bb9d979605f41fc598156b5c590923ac8184) +- Only apps should have lockfiles. [`6d14965`](https://github.com/es-shims/RegExp.prototype.flags/commit/6d1496550a962ea8525fb7b62dc4ac99d9513a6d) +- [Tests] use pretest/posttest for better organization [`0520cfd`](https://github.com/es-shims/RegExp.prototype.flags/commit/0520cfda23835fb5bff038a6e5cc530b0ce66985) +- [Tests] up to `node` `v5.5` [`810f62b`](https://github.com/es-shims/RegExp.prototype.flags/commit/810f62b6d2418e843b7c2c225841e9305dbc01ee) +- [Tests] on `node` `v5.3` [`f839662`](https://github.com/es-shims/RegExp.prototype.flags/commit/f839662887cbb1a5e472a9302185355b431c85c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`78ecaa5`](https://github.com/es-shims/RegExp.prototype.flags/commit/78ecaa5b203a07f76505824f77ce1e5d60d8b0ca) +- [Tests] up to `node` `v5.2` [`c04d762`](https://github.com/es-shims/RegExp.prototype.flags/commit/c04d762a8c09ab544df14c14521f32dac3f67823) +- [Tests] up to `node` `v5.0` [`7c0d5b9`](https://github.com/es-shims/RegExp.prototype.flags/commit/7c0d5b944d9ba30f38227d0750109d582be254e2) +- [Tests] on `node` `v5.10` [`40ddafd`](https://github.com/es-shims/RegExp.prototype.flags/commit/40ddafd83e2e1c959ee8ba24cb296559f2545a0c) +- [Deps] update `define-properties` [`98ea89d`](https://github.com/es-shims/RegExp.prototype.flags/commit/98ea89dc9c41b81b84d4071105048687dab0660e) + +## [v1.1.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Fix] cover the case where there is no descriptor on the prototype [`67014c3`](https://github.com/es-shims/RegExp.prototype.flags/commit/67014c35a93c76e28c4ab5cd3e5a54f7f40c2ddf) + +## [v1.1.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.1...v1.1.0) - 2015-08-16 + +### Commits + +- Update `jscs`, `eslint`; use my personal shared `eslint` config. [`37ca379`](https://github.com/es-shims/RegExp.prototype.flags/commit/37ca379bc72620fa6785b0a9ca791b160328c236) +- Update `eslint`, `tape`, `editorconfig-tools`, `nsp` [`cb92d6e`](https://github.com/es-shims/RegExp.prototype.flags/commit/cb92d6e8a8c1df5f00a226e11a78f38c6f7c3055) +- Implement the [es-shim API](es-shims/api). [`15eb821`](https://github.com/es-shims/RegExp.prototype.flags/commit/15eb821be2771e03a1341a08483513702118b45c) +- Refactoring to reduce complexity. [`aeb4785`](https://github.com/es-shims/RegExp.prototype.flags/commit/aeb47854f6b00355702104066c63f6eed38b5e81) +- Move implementation to `implementation.js` [`a698925`](https://github.com/es-shims/RegExp.prototype.flags/commit/a698925b4c1c78cd1ed4315b9deb5bb1707d5203) +- Update `eslint`, `jscs` [`277a4a1`](https://github.com/es-shims/RegExp.prototype.flags/commit/277a4a15e663eb823b63743b84645158b9bb9a43) +- Update `nsp`, `eslint` [`c9f3866`](https://github.com/es-shims/RegExp.prototype.flags/commit/c9f3866e25b52050f6bfe3fd0de8849de0271ea4) +- Update `tape`, `eslint` [`a08795b`](https://github.com/es-shims/RegExp.prototype.flags/commit/a08795b688b186fa5a2ec207358d81c16a07d30d) +- Make some things a bit more robust. [`450abb4`](https://github.com/es-shims/RegExp.prototype.flags/commit/450abb48974f10bfd2d9478e7ea1b9d87f004fb9) +- Update `eslint` [`25d898f`](https://github.com/es-shims/RegExp.prototype.flags/commit/25d898f62719b26fea5f9245be141103d4ec58cd) +- Test on latest two `io.js` versions. [`2e17ca3`](https://github.com/es-shims/RegExp.prototype.flags/commit/2e17ca304e12fb5071a091706a4d559b3eac968a) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`4a2a548`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a2a5480c50f30814000684462a8a3b44c87ae2e) +- Update `eslint` [`64df4e0`](https://github.com/es-shims/RegExp.prototype.flags/commit/64df4e0a2d0e2901b57652e30913db797dc0829b) +- Update `eslint` [`ac05ae5`](https://github.com/es-shims/RegExp.prototype.flags/commit/ac05ae509a4a70d107820a749ea6f02784fc41eb) +- Clean up `supportsDescriptors` check. [`e44d0de`](https://github.com/es-shims/RegExp.prototype.flags/commit/e44d0dec9c8415ff9a911b8806e1d245d6919a11) +- [Dev Deps] Update `jscs` [`8741758`](https://github.com/es-shims/RegExp.prototype.flags/commit/87417588f52f1176fc37d7c32221aa85f749aa34) +- Update `tape`, `jscs`, `nsp`, `eslint` [`db1f658`](https://github.com/es-shims/RegExp.prototype.flags/commit/db1f6584b18cc035ef3b5aec556f54e0ee8c639d) +- Test on `io.js` `v2.3` [`18c948f`](https://github.com/es-shims/RegExp.prototype.flags/commit/18c948f033c87ab2657a0395052cbec531c40900) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`c37e79f`](https://github.com/es-shims/RegExp.prototype.flags/commit/c37e79f380d87a226a6cdaa5f09f832f5dc21b7d) +- Update `tape`, `jscs`, `eslint` [`4b652bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/4b652bf5f2f0e36a15227d0b4048de91ee6c4433) +- [Dev Deps] Update `tape`, `eslint` [`29d4ac0`](https://github.com/es-shims/RegExp.prototype.flags/commit/29d4ac0bea16c6a9f611cb15baccd30449f30a91) +- Test up to `io.js` `v2.1` [`9f9e342`](https://github.com/es-shims/RegExp.prototype.flags/commit/9f9e34295ced1b288dea08e0a66dffd2bc03ff8b) +- Update `covert`, `jscs` [`c98f3b4`](https://github.com/es-shims/RegExp.prototype.flags/commit/c98f3b47f01f317e8a589486dfaee482c66b8b64) +- Update `jscs` [`9e5e220`](https://github.com/es-shims/RegExp.prototype.flags/commit/9e5e220be6ec5d5b9b658235287e35bded580b06) +- [Dev Deps] update `tape` [`cdd3af2`](https://github.com/es-shims/RegExp.prototype.flags/commit/cdd3af21507b01aa524f8b87f158dfc8a8153c85) +- [Dev Deps] update `tape` [`d42d0bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/d42d0bf28f8da2cb47fff49283a07a693f8cb626) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a5e7453`](https://github.com/es-shims/RegExp.prototype.flags/commit/a5e745375c01e9f90ff632c55a5b44b6ada38217) +- Update `tape` [`2a675ec`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a675ec707a9d89aea403d0b9a723ea531e50c2d) +- Test on `io.js` `v2.5` [`448cbdb`](https://github.com/es-shims/RegExp.prototype.flags/commit/448cbdb7df47e52677daea4e0c41e892ad8770e4) +- Test on `io.js` `v2.4` [`948e511`](https://github.com/es-shims/RegExp.prototype.flags/commit/948e51129c01147ffe4dedc3a7d4980128d0cf73) +- Test on `io.js` `v2.2` [`4793278`](https://github.com/es-shims/RegExp.prototype.flags/commit/4793278f5aca187e36b42b08fc1388d8021400e2) +- Update `eslint` [`0f463da`](https://github.com/es-shims/RegExp.prototype.flags/commit/0f463daa14a193ed94b16c46832074d63e861c91) +- Update `eslint` [`5a16967`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a16967db71bb8a24c81a27ee366f0b02b663e34) +- Test on `io.js` `v3.0` [`7ba8706`](https://github.com/es-shims/RegExp.prototype.flags/commit/7ba87064bc8520d34a9560bea8e366d70c93dbbb) +- Test on `iojs-v1.2` [`b521e09`](https://github.com/es-shims/RegExp.prototype.flags/commit/b521e099b7de48cfbdd6860265eb5e972d2859a5) + +## [v1.0.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.0...v1.0.1) - 2014-12-13 + +### Merged + +- Match the spec properly: throw when not an object; make getter generic. [`#3`](https://github.com/es-shims/RegExp.prototype.flags/pull/3) + +### Fixed + +- Match the spec properly [`#1`](https://github.com/es-shims/RegExp.prototype.flags/issues/1) + +### Commits + +- Speed up the “is object” check in case of `null` or `undefined` [`77137f9`](https://github.com/es-shims/RegExp.prototype.flags/commit/77137f99449c9b6583cdfda295a00b832dfd45f3) + +## v1.0.0 - 2014-12-10 + +### Commits + +- Adding dotfiles [`313812e`](https://github.com/es-shims/RegExp.prototype.flags/commit/313812e1d8ff42a13dbc8689f2e719324c46c9ca) +- Tests [`625a042`](https://github.com/es-shims/RegExp.prototype.flags/commit/625a042220a3152b49608fb6f187f67bff02b6fb) +- Add package.json [`8b98257`](https://github.com/es-shims/RegExp.prototype.flags/commit/8b98257f900d0a73c8eb3805b9b01999e05e880a) +- Adding the README [`884798b`](https://github.com/es-shims/RegExp.prototype.flags/commit/884798b710d5a85bc6d9a6879f509766e2e57c0e) +- Implementation. [`4186cc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/4186cc9d9a7533f78d88be976f0a8a2757604fc5) +- Adding LICENSE and CHANGELOG [`f87fa81`](https://github.com/es-shims/RegExp.prototype.flags/commit/f87fa8126cc6c39747fbe0dc6cb40ca0ff77fbbc) +- Fixing README URLs [`b821703`](https://github.com/es-shims/RegExp.prototype.flags/commit/b821703d5e5b01ee4f526f15c8e525645cf95ef7) +- Clean up dependencies; update `tape`, `jscs`, `nsp` [`0e13fc1`](https://github.com/es-shims/RegExp.prototype.flags/commit/0e13fc12df09f3a7ac30116ef13bba820c220730) +- Initial commit. [`8a9e35e`](https://github.com/es-shims/RegExp.prototype.flags/commit/8a9e35e15f65c9640e64ee14fab190a60993efaa) diff --git a/node_modules/regexp.prototype.flags/LICENSE b/node_modules/regexp.prototype.flags/LICENSE new file mode 100644 index 0000000000000..e5956a86be2f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (C) 2014 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. + diff --git a/node_modules/regexp.prototype.flags/README.md b/node_modules/regexp.prototype.flags/README.md new file mode 100644 index 0000000000000..77e151e2177f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/README.md @@ -0,0 +1,54 @@ +RegExp.prototype.flags [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES6 spec-compliant `RegExp.prototype.flags` shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable. +*Note*: `RegExp#flags` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: +```js +var flags = require('regexp.prototype.flags'); + +assert(flags(/a/) === ''); +assert(flags(new RegExp('a') === ''); +assert(flags(/a/mig) === 'gim'); +assert(flags(new RegExp('a', 'mig')) === 'gim'); + +if (!RegExp.prototype.flags) { + flags.shim(); +} + +assert(flags(/a/) === /a/.flags); +assert(flags(new RegExp('a') === new RegExp('a').flags); +assert(flags(/a/mig) === /a/mig.flags); +assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/regexp.prototype.flags +[npm-version-svg]: http://versionbadg.es/es-shims/RegExp.prototype.flags.svg +[travis-svg]: https://travis-ci.org/es-shims/RegExp.prototype.flags.svg +[travis-url]: https://travis-ci.org/es-shims/RegExp.prototype.flags +[deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags.svg +[deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags +[dev-deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags#info=devDependencies +[testling-svg]: https://ci.testling.com/es-shims/RegExp.prototype.flags.png +[testling-url]: https://ci.testling.com/es-shims/RegExp.prototype.flags +[npm-badge-png]: https://nodei.co/npm/regexp.prototype.flags.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/regexp.prototype.flags.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/regexp.prototype.flags.svg +[downloads-url]: http://npm-stat.com/charts.html?package=regexp.prototype.flags diff --git a/node_modules/regexp.prototype.flags/auto.js b/node_modules/regexp.prototype.flags/auto.js new file mode 100644 index 0000000000000..8ebf606cb02ff --- /dev/null +++ b/node_modules/regexp.prototype.flags/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/regexp.prototype.flags/implementation.js b/node_modules/regexp.prototype.flags/implementation.js new file mode 100644 index 0000000000000..9d2f0bc3effd4 --- /dev/null +++ b/node_modules/regexp.prototype.flags/implementation.js @@ -0,0 +1,39 @@ +'use strict'; + +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $Object = Object; +var $TypeError = TypeError; + +module.exports = function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.hasIndices) { + result += 'd'; + } + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}; + +if (functionsHaveConfigurableNames && Object.defineProperty) { + Object.defineProperty(module.exports, 'name', { value: 'get flags' }); +} diff --git a/node_modules/regexp.prototype.flags/index.js b/node_modules/regexp.prototype.flags/index.js new file mode 100644 index 0000000000000..d6054c766d086 --- /dev/null +++ b/node_modules/regexp.prototype.flags/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var flagsBound = callBind(getPolyfill()); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; diff --git a/node_modules/regexp.prototype.flags/package.json b/node_modules/regexp.prototype.flags/package.json new file mode 100644 index 0000000000000..671eccccd5e75 --- /dev/null +++ b/node_modules/regexp.prototype.flags/package.json @@ -0,0 +1,124 @@ +{ + "_from": "regexp.prototype.flags@^1.2.0", + "_id": "regexp.prototype.flags@1.4.3", + "_inBundle": false, + "_integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "_location": "/regexp.prototype.flags", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "regexp.prototype.flags@^1.2.0", + "name": "regexp.prototype.flags", + "escapedName": "regexp.prototype.flags", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/deep-equal" + ], + "_resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "_shasum": "87cab30f80f66660181a3bb7bf5981a872b367ac", + "_spec": "regexp.prototype.flags@^1.2.0", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/deep-equal", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/es-shims/RegExp.prototype.flags/issues" + }, + "bundleDependencies": false, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "deprecated": false, + "description": "ES6 spec-compliant RegExp.prototype.flags shim.", + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-regexp-flags": "^1.0.0", + "covert": "^1.1.1", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "foreach": "^2.0.5", + "has": "^1.0.3", + "has-strict-mode": "^1.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/es-shims/RegExp.prototype.flags#readme", + "keywords": [ + "RegExp.prototype.flags", + "regex", + "regular expression", + "ES6", + "shim", + "flag", + "flags", + "regexp", + "RegExp#flags", + "polyfill", + "es-shim API" + ], + "license": "MIT", + "main": "index.js", + "name": "regexp.prototype.flags", + "repository": { + "type": "git", + "url": "git://github.com/es-shims/RegExp.prototype.flags.git" + }, + "scripts": { + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "posttest": "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)\")\"", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "version": "1.4.3" +} diff --git a/node_modules/regexp.prototype.flags/polyfill.js b/node_modules/regexp.prototype.flags/polyfill.js new file mode 100644 index 0000000000000..2ea3dac469c96 --- /dev/null +++ b/node_modules/regexp.prototype.flags/polyfill.js @@ -0,0 +1,36 @@ +'use strict'; + +var implementation = require('./implementation'); + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var $gOPD = Object.getOwnPropertyDescriptor; + +module.exports = function getPolyfill() { + if (supportsDescriptors && (/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if ( + descriptor + && typeof descriptor.get === 'function' + && typeof RegExp.prototype.dotAll === 'boolean' + && typeof RegExp.prototype.hasIndices === 'boolean' + ) { + /* eslint getter-return: 0 */ + var calls = ''; + var o = {}; + Object.defineProperty(o, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(o, 'sticky', { + get: function () { + calls += 'y'; + } + }); + if (calls === 'dy') { + return descriptor.get; + } + } + } + return implementation; +}; diff --git a/node_modules/regexp.prototype.flags/shim.js b/node_modules/regexp.prototype.flags/shim.js new file mode 100644 index 0000000000000..3ec77c14ff3bf --- /dev/null +++ b/node_modules/regexp.prototype.flags/shim.js @@ -0,0 +1,26 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var getPolyfill = require('./polyfill'); +var gOPD = Object.getOwnPropertyDescriptor; +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; +var getProto = Object.getPrototypeOf; +var regex = /a/; + +module.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, 'flags'); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, 'flags', { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; +}; diff --git a/node_modules/regexp.prototype.flags/test/implementation.js b/node_modules/regexp.prototype.flags/test/implementation.js new file mode 100644 index 0000000000000..1e3a7141659f2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var flags = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flags.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(flags), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/index.js b/node_modules/regexp.prototype.flags/test/index.js new file mode 100644 index 0000000000000..10d10713361ad --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var flags = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { flags(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(flags, t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/shimmed.js b/node_modules/regexp.prototype.flags/test/shimmed.js new file mode 100644 index 0000000000000..059e0e17de6ec --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/shimmed.js @@ -0,0 +1,48 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var hasStrictMode = require('has-strict-mode')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); + + t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0'); + + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable'); + et.end(); + }); + + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + t.test('has the correct descriptor', function (st) { + st.equal(descriptor.configurable, true); + st.equal(descriptor.enumerable, false); + st.equal(typeof descriptor.get, 'function'); + st.equal(descriptor.set, undefined); + st.end(); + }); + + runTests(callBind(descriptor.get), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/tests.js b/node_modules/regexp.prototype.flags/test/tests.js new file mode 100644 index 0000000000000..0421a99b21ff3 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/tests.js @@ -0,0 +1,141 @@ +'use strict'; + +var has = require('has'); +var inspect = require('object-inspect'); +var supportsDescriptors = require('define-properties').supportsDescriptors; + +var forEach = require('foreach'); +var availableFlags = require('available-regexp-flags'); +var regexProperties = require('available-regexp-flags/properties'); + +var sortedFlags = availableFlags.slice().sort(function (a, b) { return a.localeCompare(b); }).join(''); + +var getRegexLiteral = function (stringRegex) { + try { + // eslint-disable-next-line no-new-func + return Function('return ' + stringRegex + ';')(); + } catch (e) { /**/ } + return null; +}; + +module.exports = function runTests(flags, t) { + t.equal(flags(/a/g), 'g', 'flags(/a/g) !== "g"'); + t.equal(flags(/a/gmi), 'gim', 'flags(/a/gmi) !== "gim"'); + t.equal(flags(new RegExp('a', 'gmi')), 'gim', 'flags(new RegExp("a", "gmi")) !== "gim"'); + t.equal(flags(/a/), '', 'flags(/a/) !== ""'); + t.equal(flags(new RegExp('a')), '', 'flags(new RegExp("a")) !== ""'); + + forEach(availableFlags, function (flag) { + var property = regexProperties[flag]; + t.test(property + ' flag', function (st) { + st.equal(flags(getRegexLiteral('/a/' + flag)), flag, 'flags(/a/' + flag + ') !== ' + inspect(flag)); + st.equal(flags(new RegExp('a', flag)), flag, 'flags(new RegExp("a", ' + inspect(flag) + ')) !== ' + inspect(flag)); + st.end(); + }); + }); + + t.test('sorting', function (st) { + st.equal(flags(/a/gim), 'gim', 'flags(/a/gim) !== "gim"'); + st.equal(flags(/a/mig), 'gim', 'flags(/a/mig) !== "gim"'); + st.equal(flags(/a/mgi), 'gim', 'flags(/a/mgi) !== "gim"'); + if (has(RegExp.prototype, 'sticky')) { + st.equal(flags(getRegexLiteral('/a/gyim')), 'gimy', 'flags(/a/gyim) !== "gimy"'); + } + if (has(RegExp.prototype, 'unicode')) { + st.equal(flags(getRegexLiteral('/a/ugmi')), 'gimu', 'flags(/a/ugmi) !== "gimu"'); + } + if (has(RegExp.prototype, 'dotAll')) { + st.equal(flags(getRegexLiteral('/a/sgmi')), 'gims', 'flags(/a/sgmi) !== "gims"'); + } + + var randomFlags = availableFlags.slice().sort(function () { return Math.random() > 0.5 ? 1 : -1; }).join(''); + st.equal( + flags(getRegexLiteral('/a/' + randomFlags)), + sortedFlags, + 'random: flags(/a/' + randomFlags + ') === ' + inspect(sortedFlags) + ); + + st.end(); + }); + + t.test('basic examples', function (st) { + st.equal(flags(/a/g), 'g', '(/a/g).flags !== "g"'); + st.equal(flags(/a/gmi), 'gim', '(/a/gmi).flags !== "gim"'); + st.equal(flags(new RegExp('a', 'gmi')), 'gim', 'new RegExp("a", "gmi").flags !== "gim"'); + st.equal(flags(/a/), '', '(/a/).flags !== ""'); + st.equal(flags(new RegExp('a')), '', 'new RegExp("a").flags !== ""'); + + st.end(); + }); + + t.test('generic flags', function (st) { + st.equal(flags({}), ''); + st.equal(flags({ ignoreCase: true }), 'i'); + st.equal(flags({ dotAll: 1, global: 0, sticky: 1, unicode: 1 }), 'suy'); + st.equal(flags({ __proto__: { multiline: true } }), 'm'); + + var obj = {}; + forEach(availableFlags, function (flag) { + obj[regexProperties[flag]] = true; + }); + st.equal(flags(obj), sortedFlags, 'an object with every available flag: ' + sortedFlags); + + st.end(); + }); + + t.test('throws properly', function (st) { + var nonObjects = ['', false, true, 42, NaN, null, undefined]; + st.plan(nonObjects.length); + var throwsOnNonObject = function (nonObject) { + st['throws'](flags.bind(null, nonObject), TypeError, inspect(nonObject) + ' is not an Object'); + }; + nonObjects.forEach(throwsOnNonObject); + }); + + t.test('getters', { skip: !supportsDescriptors }, function (st) { + /* eslint getter-return: 0 */ + var calls = ''; + var re = {}; + Object.defineProperty(re, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(re, 'global', { + get: function () { + calls += 'g'; + } + }); + Object.defineProperty(re, 'ignoreCase', { + get: function () { + calls += 'i'; + } + }); + Object.defineProperty(re, 'multiline', { + get: function () { + calls += 'm'; + } + }); + Object.defineProperty(re, 'dotAll', { + get: function () { + calls += 's'; + } + }); + Object.defineProperty(re, 'unicode', { + get: function () { + calls += 'u'; + } + }); + Object.defineProperty(re, 'sticky', { + get: function () { + calls += 'y'; + } + }); + + flags(re); + + st.equal(calls, 'dgimsuy', 'getters are called in expected order'); + + st.end(); + }); +}; diff --git a/package-lock.json b/package-lock.json index 144c674879122..b8eeaddd822ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1303,6 +1303,16 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "call-limit": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/call-limit/-/call-limit-1.1.1.tgz", @@ -1907,10 +1917,26 @@ } }, "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + } + } }, "deep-extend": { "version": "0.6.0", @@ -2991,6 +3017,12 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -3069,6 +3101,25 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -3224,6 +3275,23 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -3562,6 +3630,16 @@ "is-decimal": "^1.0.0" } }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5309,6 +5387,16 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", @@ -6002,6 +6090,17 @@ "once": "^1.3.0" } }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, "registry-auth-token": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", diff --git a/package.json b/package.json index 77661b46276df..be97b9070a5f5 100644 --- a/package.json +++ b/package.json @@ -279,7 +279,7 @@ "@mdx-js/mdx": "^1.6.22", "bl": "^3.0.1", "cmark-gfm": "^0.8.3", - "deep-equal": "^1.0.1", + "deep-equal": "^1.1.1", "get-stream": "^4.1.0", "jsdom": "^16.4.0", "licensee": "^7.0.3",