|
|
hai 4 meses | |
|---|---|---|
| .. | ||
| .github | hai 4 meses | |
| test | hai 4 meses | |
| .eslintrc | hai 4 meses | |
| .nycrc | hai 4 meses | |
| CHANGELOG.md | hai 4 meses | |
| LICENSE | hai 4 meses | |
| README.md | hai 4 meses | |
| index.d.ts | hai 4 meses | |
| index.js | hai 4 meses | |
| package.json | hai 4 meses | |
| tsconfig.json | hai 4 meses | |
Robust call-bound JavaScript intrinsics, using call-bind and get-intrinsic.
npm install --save call-bound
const assert = require('assert');
const callBound = require('call-bound');
const slice = callBound('Array.prototype.slice');
delete Function.prototype.call;
delete Function.prototype.bind;
delete Array.prototype.slice;
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
Clone the repo, npm install, and run npm test