mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
13
web/node_modules/array-includes/.editorconfig
generated
vendored
Normal file
13
web/node_modules/array-includes/.editorconfig
generated
vendored
Normal file
|
@ -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;
|
||||
|
1
web/node_modules/array-includes/.eslintignore
generated
vendored
Normal file
1
web/node_modules/array-includes/.eslintignore
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
coverage/
|
22
web/node_modules/array-includes/.eslintrc
generated
vendored
Normal file
22
web/node_modules/array-includes/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"complexity": 0,
|
||||
"id-length": [2, { "min": 1, "max": 26 }],
|
||||
"max-statements": [2, 14],
|
||||
"new-cap": [2, { capIsNewExceptions: ["GetIntrinsic", "ToObject", "ToInteger", "ToLength", "SameValueZero", "RequireObjectCoercible"] }],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"max-lines-per-function": 0,
|
||||
"no-invalid-this": 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
web/node_modules/array-includes/.github/FUNDING.yml
generated
vendored
Normal file
12
web/node_modules/array-includes/.github/FUNDING.yml
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/array-includes
|
||||
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']
|
13
web/node_modules/array-includes/.nycrc
generated
vendored
Normal file
13
web/node_modules/array-includes/.nycrc
generated
vendored
Normal file
|
@ -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"
|
||||
]
|
||||
}
|
121
web/node_modules/array-includes/CHANGELOG.md
generated
vendored
Normal file
121
web/node_modules/array-includes/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,121 @@
|
|||
3.1.3 / 2021-02-20
|
||||
=================
|
||||
* [Deps] update `call-bind`, `es-abstract`, `get-intrinsic`
|
||||
* [meta] do not publish github action workflow files
|
||||
* [meta] gitignore coverage output
|
||||
* [actions] update workflows
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape`
|
||||
* [Tests] increase coverage
|
||||
|
||||
3.1.2 / 2020-11-24
|
||||
=================
|
||||
* [Robustness] remove dependency on `.apply`
|
||||
* [Deps] update `es-abstract`; use `call-bind` and `get-intrinsic` where applicable
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `tape`; add `aud`, `safe-publish-latest`
|
||||
* [actions] add "Allow Edits" workflow
|
||||
* [actions] switch Automatic Rebase workflow to `pull_request_target` event
|
||||
* [Tests] migrate tests to Github Actions
|
||||
* [Tests] run `nyc` on all tests
|
||||
* [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner
|
||||
|
||||
3.1.1 / 2019-12-21
|
||||
=================
|
||||
* [Fix] IE < 9 does not have index access on strings
|
||||
* [Deps] update `es-abstract`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
|
||||
* [meta] remove unused Makefile and associated utilities
|
||||
* [Tests] add string tests
|
||||
|
||||
3.1.0 / 2019-12-11
|
||||
=================
|
||||
* [New] add `auto` entry point
|
||||
* [Refactor] use split-up `es-abstract` (68% bundle size decrease)
|
||||
* [readme] fix repo URLs, remove testling, fix readme parsing
|
||||
* [Deps] update `es-abstract`, `define-properties`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd`, `covert`, `functions-have-names`, `replace`, `semver`, `tape`, `@es-shims/api`, `function-bind`
|
||||
* [meta] add `funding` field, FUNDING.yml
|
||||
* [meta] Only apps should have lockfiles
|
||||
* [Tests] add more `fromIndex` tests
|
||||
* [Tests] use shared travis-ci configs
|
||||
* [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops
|
||||
* [Tests] remove `jscs`
|
||||
* [Tests] use `functions-have-names`
|
||||
* [Tests] use `npm audit` instead of `nsp`
|
||||
* [Tests] remove `jscs`
|
||||
* [actions] add automatic rebasing / merge commit blocking
|
||||
|
||||
3.0.3 / 2017-04-18
|
||||
=================
|
||||
* [Fix] ensure that `shim.js` actually shims when the polyfill differs from native
|
||||
* [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; comment out OS X builds; improve test matrix
|
||||
* [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config`, `tape`, `jscs`, `semver`, `function-bind`, `@es-shims/api`
|
||||
* [Deps] update `es-abstract`
|
||||
* [Docs] update readme: add “getting started” and “usage” (#19)
|
||||
|
||||
3.0.2 / 2015-06-06
|
||||
=================
|
||||
* Use the polyfill, not the implementation, as the default export
|
||||
* [Deps] update `es-abstract`
|
||||
* [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`
|
||||
* [Tests] up to `node` `v5.5`
|
||||
* [Tests] keep tests passing in `node` `v0.8`
|
||||
* [Tests] Only run `evalmd` as part of the full test suite, since it's more like a linter
|
||||
* [Tests] fix npm upgrades for older nodes
|
||||
|
||||
3.0.1 / 2015-05-23
|
||||
=================
|
||||
* [Fix] in "shim", assign the polyfill, not the implementation
|
||||
|
||||
3.0.0 / 2015-05-23
|
||||
=================
|
||||
* [Breaking] Implement the [es-shim API](es-shims/api)
|
||||
* [Deps] update `define-properties`, `es-abstract`
|
||||
* [Dev Deps] update `eslint`, `semver`, `nsp`, `semver`, `jscs`
|
||||
* [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
|
||||
* [Tests] use my personal shared `eslint` config
|
||||
* [Tests] up to `io.js` `v3.0`
|
||||
|
||||
2.0.0 / 2015-05-23
|
||||
=================
|
||||
* Fix to not skip holes, per https://github.com/tc39/Array.prototype.includes/issues/15
|
||||
|
||||
1.1.1 / 2015-05-23
|
||||
=================
|
||||
* Test up to `io.js` `v2.0`
|
||||
* Update `es-abstract`, `tape`, `eslint`, `semver`, `jscs`, `semver`
|
||||
|
||||
1.1.0 / 2015-03-19
|
||||
=================
|
||||
* Update `es-abstract`, `editorconfig-tools`, `nsp`, `eslint`, `semver`
|
||||
|
||||
1.0.6 / 2015-02-17
|
||||
=================
|
||||
* All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`.
|
||||
* Run `travis-ci` tests on `iojs` and `node` v0.12; allow 0.8 failures.
|
||||
* Update `tape`, `jscs`, `es-abstract`, remove `is`.
|
||||
|
||||
1.0.5 / 2015-01-30
|
||||
=================
|
||||
* Update `tape`, `jscs`, `nsp`, `eslint`, `es-abstract`
|
||||
|
||||
1.0.4 / 2015-01-10
|
||||
=================
|
||||
* Use `es-abstract` for ECMAScript spec internal abstract operations
|
||||
|
||||
1.0.3 / 2015-01-06
|
||||
=================
|
||||
* Speed optimization: use Array#indexOf when available
|
||||
* Fix ES3, IE 6-8, Opera 10.6, Opera 11.1 support
|
||||
* Run testling on both sets of tests
|
||||
|
||||
1.0.2 / 2015-01-05
|
||||
=================
|
||||
* Ensure tests are includes in the module on `npm`
|
||||
|
||||
1.0.1 / 2015-01-04
|
||||
=================
|
||||
* Remove mistaken auto-shim.
|
||||
|
||||
1.0.0 / 2015-01-04
|
||||
=================
|
||||
* v1.0.0
|
21
web/node_modules/array-includes/LICENSE
generated
vendored
Normal file
21
web/node_modules/array-includes/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 2015 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
94
web/node_modules/array-includes/README.md
generated
vendored
Normal file
94
web/node_modules/array-includes/README.md
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
# array-includes <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![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]
|
||||
|
||||
An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.
|
||||
|
||||
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 proposed [spec](http://www.ecma-international.org/ecma-262/6.0/).
|
||||
|
||||
Because `Array.prototype.includes` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save array-includes
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Basic usage: **includes(array, value[, fromIndex=0])**
|
||||
|
||||
```js
|
||||
var includes = require('array-includes');
|
||||
var assert = require('assert');
|
||||
var arr = [ 'one', 'two' ];
|
||||
|
||||
includes(arr, 'one'); // true
|
||||
includes(arr, 'three'); // false
|
||||
includes(arr, 'one', 1); // false
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var arr = [
|
||||
1,
|
||||
'foo',
|
||||
NaN,
|
||||
-0
|
||||
];
|
||||
|
||||
assert.equal(arr.indexOf(0) > -1, true);
|
||||
assert.equal(arr.indexOf(-0) > -1, true);
|
||||
assert.equal(includes(arr, 0), true);
|
||||
assert.equal(includes(arr, -0), true);
|
||||
|
||||
assert.equal(arr.indexOf(NaN) > -1, false);
|
||||
assert.equal(includes(arr, NaN), true);
|
||||
|
||||
assert.equal(includes(arr, 'foo', 0), true);
|
||||
assert.equal(includes(arr, 'foo', 1), true);
|
||||
assert.equal(includes(arr, 'foo', 2), false);
|
||||
```
|
||||
|
||||
```js
|
||||
/* when Array#includes is not present */
|
||||
delete Array.prototype.includes;
|
||||
var shimmedIncludes = includes.shim();
|
||||
|
||||
assert.equal(shimmedIncludes, includes.getPolyfill());
|
||||
assert.equal(arr.includes('foo', 1), includes(arr, 'foo', 1));
|
||||
```
|
||||
|
||||
```js
|
||||
/* when Array#includes is present */
|
||||
var shimmedIncludes = includes.shim();
|
||||
|
||||
assert.equal(shimmedIncludes, Array.prototype.includes);
|
||||
assert.equal(arr.includes(1, 'foo'), includes(arr, 1, 'foo'));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/array-includes
|
||||
[npm-version-svg]: http://versionbadg.es/es-shims/array-includes.svg
|
||||
[travis-svg]: https://travis-ci.org/es-shims/array-includes.svg
|
||||
[travis-url]: https://travis-ci.org/es-shims/array-includes
|
||||
[deps-svg]: https://david-dm.org/es-shims/array-includes.svg
|
||||
[deps-url]: https://david-dm.org/es-shims/array-includes
|
||||
[dev-deps-svg]: https://david-dm.org/es-shims/array-includes/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/es-shims/array-includes#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/array-includes.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/array-includes.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/array-includes.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=array-includes
|
3
web/node_modules/array-includes/auto.js
generated
vendored
Normal file
3
web/node_modules/array-includes/auto.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
require('./shim')();
|
35
web/node_modules/array-includes/implementation.js
generated
vendored
Normal file
35
web/node_modules/array-includes/implementation.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
var ToInteger = require('es-abstract/2020/ToInteger');
|
||||
var ToLength = require('es-abstract/2020/ToLength');
|
||||
var ToObject = require('es-abstract/2020/ToObject');
|
||||
var SameValueZero = require('es-abstract/2020/SameValueZero');
|
||||
var $isNaN = require('es-abstract/helpers/isNaN');
|
||||
var $isFinite = require('es-abstract/helpers/isFinite');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
var isString = require('is-string');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
var $indexOf = GetIntrinsic('%Array.prototype.indexOf%'); // TODO: use callBind.apply without breaking IE 8
|
||||
|
||||
module.exports = function includes(searchElement) {
|
||||
var fromIndex = arguments.length > 1 ? ToInteger(arguments[1]) : 0;
|
||||
if ($indexOf && !$isNaN(searchElement) && $isFinite(fromIndex) && typeof searchElement !== 'undefined') {
|
||||
return $indexOf.apply(this, arguments) > -1;
|
||||
}
|
||||
|
||||
var O = ToObject(this);
|
||||
var length = ToLength(O.length);
|
||||
if (length === 0) {
|
||||
return false;
|
||||
}
|
||||
var k = fromIndex >= 0 ? fromIndex : Math.max(0, length + fromIndex);
|
||||
while (k < length) {
|
||||
if (SameValueZero(searchElement, isString(O) ? $charAt(O, k) : O[k])) {
|
||||
return true;
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
return false;
|
||||
};
|
27
web/node_modules/array-includes/index.js
generated
vendored
Normal file
27
web/node_modules/array-includes/index.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
|
||||
var callBind = require('call-bind');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var implementation = require('./implementation');
|
||||
var getPolyfill = require('./polyfill');
|
||||
var polyfill = callBind.apply(getPolyfill());
|
||||
var shim = require('./shim');
|
||||
|
||||
var $slice = callBound('Array.prototype.slice');
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
var boundShim = function includes(array, searchElement) {
|
||||
/* eslint-enable no-unused-vars */
|
||||
RequireObjectCoercible(array);
|
||||
return polyfill(array, $slice(arguments, 1));
|
||||
};
|
||||
define(boundShim, {
|
||||
getPolyfill: getPolyfill,
|
||||
implementation: implementation,
|
||||
shim: shim
|
||||
});
|
||||
|
||||
module.exports = boundShim;
|
93
web/node_modules/array-includes/package.json
generated
vendored
Normal file
93
web/node_modules/array-includes/package.json
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"name": "array-includes",
|
||||
"version": "3.1.3",
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
}
|
||||
],
|
||||
"description": "An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublish": "safe-publish-latest",
|
||||
"pretest": "npm run --silent lint && evalmd README.md",
|
||||
"test": "npm run --silent tests-only",
|
||||
"posttest": "npx aud --production",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"lint": "eslint .",
|
||||
"postlint": "es-shim-api --bound"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/es-shims/array-includes.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Array.prototype.includes",
|
||||
"includes",
|
||||
"array",
|
||||
"ES7",
|
||||
"shim",
|
||||
"polyfill",
|
||||
"contains",
|
||||
"Array.prototype.contains",
|
||||
"es-shim API"
|
||||
],
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.18.0-next.2",
|
||||
"get-intrinsic": "^1.1.1",
|
||||
"is-string": "^1.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@es-shims/api": "^2.1.2",
|
||||
"@ljharb/eslint-config": "^17.5.1",
|
||||
"aud": "^1.1.4",
|
||||
"eslint": "^7.20.0",
|
||||
"evalmd": "0.0.19",
|
||||
"foreach": "^2.0.5",
|
||||
"function-bind": "^1.1.1",
|
||||
"functions-have-names": "^1.2.2",
|
||||
"has-strict-mode": "^1.0.1",
|
||||
"indexof": "^0.0.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^5.2.0"
|
||||
},
|
||||
"testling": {
|
||||
"files": [
|
||||
"test/index.js",
|
||||
"test/implementation.js",
|
||||
"test/shimmed.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"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
7
web/node_modules/array-includes/polyfill.js
generated
vendored
Normal file
7
web/node_modules/array-includes/polyfill.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
return Array.prototype.includes || implementation;
|
||||
};
|
14
web/node_modules/array-includes/shim.js
generated
vendored
Normal file
14
web/node_modules/array-includes/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var getPolyfill = require('./polyfill');
|
||||
|
||||
module.exports = function shimArrayPrototypeIncludes() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Array.prototype,
|
||||
{ includes: polyfill },
|
||||
{ includes: function () { return Array.prototype.includes !== polyfill; } }
|
||||
);
|
||||
return polyfill;
|
||||
};
|
20
web/node_modules/array-includes/test/implementation.js
generated
vendored
Normal file
20
web/node_modules/array-includes/test/implementation.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var implementation = 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 () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(callBind(implementation), t);
|
||||
|
||||
t.end();
|
||||
});
|
17
web/node_modules/array-includes/test/index.js
generated
vendored
Normal file
17
web/node_modules/array-includes/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
var includes = 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 () { includes(undefined, 'a'); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { includes(null, 'a'); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(includes, t);
|
||||
|
||||
t.end();
|
||||
});
|
36
web/node_modules/array-includes/test/shimmed.js
generated
vendored
Normal file
36
web/node_modules/array-includes/test/shimmed.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
'use strict';
|
||||
|
||||
require('../auto');
|
||||
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var bind = require('function-bind');
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('shimmed', function (t) {
|
||||
t.equal(Array.prototype.includes.length, 1, 'Array#includes has a length of 1');
|
||||
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
||||
st.equal(Array.prototype.includes.name, 'includes', 'Array#includes has name "includes"');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
||||
et.equal(false, isEnumerable.call(Array.prototype, 'includes'), 'Array#includes is not enumerable');
|
||||
et.end();
|
||||
});
|
||||
|
||||
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
||||
|
||||
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
|
||||
st['throws'](function () { return Array.prototype.includes.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { return Array.prototype.includes.call(null, 'a'); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(bind.call(Function.call, Array.prototype.includes), t);
|
||||
|
||||
t.end();
|
||||
});
|
94
web/node_modules/array-includes/test/tests.js
generated
vendored
Normal file
94
web/node_modules/array-includes/test/tests.js
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function (includes, t) {
|
||||
var sparseish = { length: 5, 0: 'a', 1: 'b' };
|
||||
var overfullarrayish = { length: 2, 0: 'a', 1: 'b', 2: 'c' };
|
||||
var thrower = { valueOf: function () { throw new RangeError('whoa'); } };
|
||||
var numberish = { valueOf: function () { return 2; } };
|
||||
|
||||
t.test('simple examples', function (st) {
|
||||
st.equal(true, includes([1, 2, 3], 1), '[1, 2, 3] includes 1');
|
||||
st.equal(false, includes([1, 2, 3], 4), '[1, 2, 3] does not include 4');
|
||||
st.equal(true, includes([NaN], NaN), '[NaN] includes NaN');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not skip holes', function (st) {
|
||||
st.equal(true, includes(Array(1)), 'Array(1) includes undefined');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('exceptions', function (et) {
|
||||
et.test('fromIndex conversion', function (st) {
|
||||
st['throws'](function () { includes([0], 0, thrower); }, RangeError, 'fromIndex conversion throws');
|
||||
st.end();
|
||||
});
|
||||
|
||||
et.test('ToLength', function (st) {
|
||||
st['throws'](function () { includes({ length: thrower, 0: true }, true); }, RangeError, 'ToLength conversion throws');
|
||||
st.end();
|
||||
});
|
||||
|
||||
et.end();
|
||||
});
|
||||
|
||||
t.test('arraylike', function (st) {
|
||||
st.equal(true, includes(sparseish, 'a'), 'sparse array-like object includes "a"');
|
||||
st.equal(false, includes(sparseish, 'c'), 'sparse array-like object does not include "c"');
|
||||
|
||||
st.equal(true, includes(overfullarrayish, 'b'), 'sparse array-like object includes "b"');
|
||||
st.equal(false, includes(overfullarrayish, 'c'), 'sparse array-like object does not include "c"');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('fromIndex', function (ft) {
|
||||
ft.equal(true, includes([1], 1, NaN), 'NaN fromIndex -> 0 fromIndex');
|
||||
|
||||
ft.equal(true, includes([0, 1, 2], 1, 0), 'starting from 0 finds index 1');
|
||||
ft.equal(true, includes([0, 1, 2], 1, 1), 'starting from 1 finds index 1');
|
||||
ft.equal(false, includes([0, 1, 2], 1, 2), 'starting from 2 does not find index 1');
|
||||
|
||||
ft.test('number coercion', function (st) {
|
||||
st.equal(false, includes(['a', 'b', 'c'], 'a', numberish), 'does not find "a" with object fromIndex coercing to 2');
|
||||
st.equal(false, includes(['a', 'b', 'c'], 'a', '2'), 'does not find "a" with string fromIndex coercing to 2');
|
||||
st.equal(true, includes(['a', 'b', 'c'], 'c', numberish), 'finds "c" with object fromIndex coercing to 2');
|
||||
st.equal(true, includes(['a', 'b', 'c'], 'c', '2'), 'finds "c" with string fromIndex coercing to 2');
|
||||
st.end();
|
||||
});
|
||||
|
||||
ft.test('fromIndex greater than length', function (st) {
|
||||
st.equal(false, includes([1], 1, 2), 'array of length 1 is not searched if fromIndex is > 1');
|
||||
st.equal(false, includes([1], 1, 1), 'array of length 1 is not searched if fromIndex is >= 1');
|
||||
st.equal(false, includes([1], 1, 1.1), 'array of length 1 is not searched if fromIndex is 1.1');
|
||||
st.equal(false, includes([1], 1, Infinity), 'array of length 1 is not searched if fromIndex is Infinity');
|
||||
st.end();
|
||||
});
|
||||
|
||||
ft.test('negative fromIndex', function (st) {
|
||||
st.equal(true, includes([1, 3], 1, -4), 'computed length would be negative; fromIndex is thus 0');
|
||||
st.equal(true, includes([1, 3], 3, -4), 'computed length would be negative; fromIndex is thus 0');
|
||||
st.equal(true, includes([1, 3], 1, -Infinity), 'computed length would be negative; fromIndex is thus 0');
|
||||
|
||||
st.equal(true, includes([12, 13], 13, -1), 'finds -1st item with -1 fromIndex');
|
||||
st.equal(false, includes([12, 13], 12, -1), 'does not find -2nd item with -1 fromIndex');
|
||||
st.equal(true, includes([12, 13], 13, -2), 'finds -2nd item with -2 fromIndex');
|
||||
|
||||
st.equal(true, includes(sparseish, 'b', -4), 'finds -4th item with -4 fromIndex');
|
||||
st.equal(false, includes(sparseish, 'a', -4), 'does not find -5th item with -4 fromIndex');
|
||||
st.equal(true, includes(sparseish, 'a', -5), 'finds -5th item with -5 fromIndex');
|
||||
st.end();
|
||||
});
|
||||
|
||||
ft.end();
|
||||
});
|
||||
|
||||
t.test('strings', function (st) {
|
||||
st.equal(true, includes('abc', 'c'), 'string includes one of its chars');
|
||||
st.equal(false, includes('abc', 'd'), 'string does not include a char it should not');
|
||||
|
||||
st.equal(true, includes(Object('abc'), 'c'), 'boxed string includes one of its chars');
|
||||
st.equal(false, includes(Object('abc'), 'd'), 'boxed string does not include a char it should not');
|
||||
|
||||
st.end();
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue