OpenStreetMap-Service/node_modules/call-bound
zhangxunhui 54690c2f41 openstreetmap service 2026-03-26 22:27:42 +08:00
..
.github openstreetmap service 2026-03-26 22:27:42 +08:00
test openstreetmap service 2026-03-26 22:27:42 +08:00
.eslintrc openstreetmap service 2026-03-26 22:27:42 +08:00
.nycrc openstreetmap service 2026-03-26 22:27:42 +08:00
CHANGELOG.md openstreetmap service 2026-03-26 22:27:42 +08:00
LICENSE openstreetmap service 2026-03-26 22:27:42 +08:00
README.md openstreetmap service 2026-03-26 22:27:42 +08:00
index.d.ts openstreetmap service 2026-03-26 22:27:42 +08:00
index.js openstreetmap service 2026-03-26 22:27:42 +08:00
package.json openstreetmap service 2026-03-26 22:27:42 +08:00
tsconfig.json openstreetmap service 2026-03-26 22:27:42 +08:00

README.md

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