es-shim-unscopables
Helper package to shim a method into `Array.prototype[Symbol.unscopables]`
Last updated a year ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install es-shim-unscopables 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.2                                ...           latest (a year ago)

3 Versions

  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (13)

© 2010 - cnpmjs.org x YWFE | Home | YWFE