call-bound
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

call-bound Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Robust call-bound JavaScript intrinsics, using call-bind and get-intrinsic.

Getting started

npm install --save call-bound

Usage/Examples

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]);

Tests

Clone the repo, npm install, and run npm test

Package Sidebar

Install

npm i call-bound

Weekly Downloads

25,134,847

Version

1.0.3

License

MIT

Unpacked Size

12 kB

Total Files

11

Last publish

Collaborators

  • ljharb