max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
test b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 2 tuần trước cách đây

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.