odin-js-fundamentals-part-5/node_modules/es-shim-unscopables
NetMan 4c89a8ee8c Initial commit 2024-01-11 09:52:05 +01:00
..
.github Initial commit 2024-01-11 09:52:05 +01:00
test Initial commit 2024-01-11 09:52:05 +01:00
.eslintrc Initial commit 2024-01-11 09:52:05 +01:00
.nycrc Initial commit 2024-01-11 09:52:05 +01:00
CHANGELOG.md Initial commit 2024-01-11 09:52:05 +01:00
LICENSE Initial commit 2024-01-11 09:52:05 +01:00
README.md Initial commit 2024-01-11 09:52:05 +01:00
index.js Initial commit 2024-01-11 09:52:05 +01:00
package.json Initial commit 2024-01-11 09:52:05 +01:00

README.md

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.