Initial Save
This commit is contained in:
10
node_modules/es-array-method-boxes-properly/.eslintrc
generated
vendored
Normal file
10
node_modules/es-array-method-boxes-properly/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"id-length": 0,
|
||||
"strict": 0,
|
||||
},
|
||||
}
|
||||
12
node_modules/es-array-method-boxes-properly/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/es-array-method-boxes-properly/.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/es-array-method-boxes-properly
|
||||
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']
|
||||
21
node_modules/es-array-method-boxes-properly/LICENSE
generated
vendored
Normal file
21
node_modules/es-array-method-boxes-properly/LICENSE
generated
vendored
Normal file
@@ -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.
|
||||
3
node_modules/es-array-method-boxes-properly/README.md
generated
vendored
Normal file
3
node_modules/es-array-method-boxes-properly/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# es-array-method-boxes-properly
|
||||
|
||||
Utility package to determine if an `Array.prototype` method properly boxes the callback's receiver and third argument.
|
||||
30
node_modules/es-array-method-boxes-properly/index.js
generated
vendored
Normal file
30
node_modules/es-array-method-boxes-properly/index.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = function properlyBoxed(method) {
|
||||
// Check node 0.6.21 bug where third parameter is not boxed
|
||||
var properlyBoxesNonStrict = true;
|
||||
var properlyBoxesStrict = true;
|
||||
var threwException = false;
|
||||
if (typeof method === 'function') {
|
||||
try {
|
||||
// eslint-disable-next-line max-params
|
||||
method.call('f', function (_, __, O) {
|
||||
if (typeof O !== 'object') {
|
||||
properlyBoxesNonStrict = false;
|
||||
}
|
||||
});
|
||||
|
||||
method.call(
|
||||
[null],
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
properlyBoxesStrict = typeof this === 'string'; // eslint-disable-line no-invalid-this
|
||||
},
|
||||
'x'
|
||||
);
|
||||
} catch (e) {
|
||||
threwException = true;
|
||||
}
|
||||
return !threwException && properlyBoxesNonStrict && properlyBoxesStrict;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
30
node_modules/es-array-method-boxes-properly/package.json
generated
vendored
Normal file
30
node_modules/es-array-method-boxes-properly/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "es-array-method-boxes-properly",
|
||||
"version": "1.0.0",
|
||||
"description": "Utility package to determine if an `Array.prototype` method properly boxes the callback's receiver and third argument.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublish": "safe-publish-latest",
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "node test",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx aud"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/es-array-method-boxes-properly.git"
|
||||
},
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/es-array-method-boxes-properly/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/es-array-method-boxes-properly#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^14.1.0",
|
||||
"eslint": "^6.4.0",
|
||||
"safe-publish-latest": "^1.1.3",
|
||||
"tape": "^4.11.0"
|
||||
}
|
||||
}
|
||||
11
node_modules/es-array-method-boxes-properly/test/index.js
generated
vendored
Normal file
11
node_modules/es-array-method-boxes-properly/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var test = require('tape');
|
||||
|
||||
var arrayMethodBoxesProperly = require('..');
|
||||
|
||||
test('arrayMethodBoxesProperly', function (t) {
|
||||
t.equal(typeof arrayMethodBoxesProperly, 'function', 'is a function');
|
||||
|
||||
t.equal(typeof arrayMethodBoxesProperly(), 'boolean', 'returns a boolean');
|
||||
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user