.. | |||
.github | 16 days ago | ||
test | 16 days ago | ||
.eslintrc | 16 days ago | ||
.nycrc | 16 days ago | ||
CHANGELOG.md | 16 days ago | ||
LICENSE | 16 days ago | ||
README.md | 16 days ago | ||
index.d.ts | 16 days ago | ||
index.js | 16 days ago | ||
package.json | 16 days ago | ||
tsconfig.json | 16 days ago |
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