revere.dev/safelock/dashboard/node_modules/es-shim-unscopables
Brandon Hall 87bad2254c Remi a skid 2024-07-01 20:55:25 +01:00
..
.github Remi a skid 2024-07-01 20:55:25 +01:00
test Remi a skid 2024-07-01 20:55:25 +01:00
.eslintrc Remi a skid 2024-07-01 20:55:25 +01:00
.nycrc Remi a skid 2024-07-01 20:55:25 +01:00
CHANGELOG.md Remi a skid 2024-07-01 20:55:25 +01:00
LICENSE Remi a skid 2024-07-01 20:55:25 +01:00
README.md Remi a skid 2024-07-01 20:55:25 +01:00
index.js Remi a skid 2024-07-01 20:55:25 +01:00
package.json Remi a skid 2024-07-01 20:55:25 +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.