radin-scale-api/node_modules/call-bind-apply-helpers
mehranz 0eb8fbcf69 update 2026-02-16 15:55:07 +03:30
..
.github update 2026-02-16 15:55:07 +03:30
test update 2026-02-16 15:55:07 +03:30
.eslintrc update 2026-02-16 15:55:07 +03:30
.nycrc update 2026-02-16 15:55:07 +03:30
CHANGELOG.md update 2026-02-16 15:55:07 +03:30
LICENSE update 2026-02-16 15:55:07 +03:30
README.md update 2026-02-16 15:55:07 +03:30
actualApply.d.ts update 2026-02-16 15:55:07 +03:30
actualApply.js update 2026-02-16 15:55:07 +03:30
applyBind.d.ts update 2026-02-16 15:55:07 +03:30
applyBind.js update 2026-02-16 15:55:07 +03:30
functionApply.d.ts update 2026-02-16 15:55:07 +03:30
functionApply.js update 2026-02-16 15:55:07 +03:30
functionCall.d.ts update 2026-02-16 15:55:07 +03:30
functionCall.js update 2026-02-16 15:55:07 +03:30
index.d.ts update 2026-02-16 15:55:07 +03:30
index.js update 2026-02-16 15:55:07 +03:30
package.json update 2026-02-16 15:55:07 +03:30
reflectApply.d.ts update 2026-02-16 15:55:07 +03:30
reflectApply.js update 2026-02-16 15:55:07 +03:30
tsconfig.json update 2026-02-16 15:55:07 +03:30

README.md

call-bind-apply-helpers Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Helper functions around Function call/apply/bind, for use in call-bind.

The only packages that should likely ever use this package directly are call-bind and get-intrinsic. Please use call-bind unless you have a very good reason not to.

Getting started

npm install --save call-bind-apply-helpers

Usage/Examples

const assert = require('assert');
const callBindBasic = require('call-bind-apply-helpers');

function f(a, b) {
	assert.equal(this, 1);
	assert.equal(a, 2);
	assert.equal(b, 3);
	assert.equal(arguments.length, 2);
}

const fBound = callBindBasic([f, 1]);

delete Function.prototype.call;
delete Function.prototype.bind;

fBound(2, 3);

Tests

Clone the repo, npm install, and run npm test