max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
test b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 2 hafta önce

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.