root 3bf41bf355 update | il y a 1 an | |
---|---|---|
.. | ||
.github | il y a 1 an | |
test | il y a 1 an | |
.eslintrc | il y a 1 an | |
.nycrc | il y a 1 an | |
CHANGELOG.md | il y a 1 an | |
LICENSE | il y a 1 an | |
README.md | il y a 1 an | |
index.js | il y a 1 an | |
package.json | il y a 1 an |
Helper package to shim a method into Array.prototype[Symbol.unscopables]
const assert = require('assert');
const shimUnscopables = require('es-shim-unscopables');
let copyWithin;
let concat;
with ([]) {
assert.equal(concat, Array.prototype.concat);
assert.notEqual(copyWithin, Array.prototype.copyWithin);
}
shimUnscopables('concat');
with ([]) {
assert.notEqual(concat, Array.prototype.concat);
assert.notEqual(copyWithin, Array.prototype.copyWithin);
}
Simply clone the repo, npm install
, and run npm test
Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.