WUT_Computer_Science/EGUI/lab3/front/node_modules/es-shim-unscopables
2022-06-15 03:02:51 +02:00
..
.github chore 2022-06-15 03:02:51 +02:00
test chore 2022-06-15 03:02:51 +02:00
.eslintrc chore 2022-06-15 03:02:51 +02:00
.nycrc chore 2022-06-15 03:02:51 +02:00
CHANGELOG.md chore 2022-06-15 03:02:51 +02:00
index.js chore 2022-06-15 03:02:51 +02:00
LICENSE chore 2022-06-15 03:02:51 +02:00
package.json chore 2022-06-15 03:02:51 +02:00
README.md chore 2022-06-15 03:02:51 +02:00

es-shim-unscopables Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Helper package to shim a method into Array.prototype[Symbol.unscopables]

Example

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);
}

Tests

Simply clone the repo, npm install, and run npm test

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.