call-bound <sup>Version Badge</sup>

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

call-bound - Installation

To install call-bound via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install call-bound --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install call-bound

Learn more about the config option.

PNPM

pnpm install call-bound --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install call-bound --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

call-bound - Download

Download Tarball (v1.0.4)

Integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==
SHASUM 238de935d2a2a692928c538c7ccfa91067fd062a
Tarball https://js.registry.sudovanilla.org/call-bound/-/call-bound-1.0.4.tgz