2.2.15 • Published 28 days ago
@kollorg/eligendi-nobis-blanditiis v2.2.15
@kollorg/eligendi-nobis-blanditiis ![Version Badge](https://versionbadg.es/ljharb/@kollorg/eligendi-nobis-blanditiis.svg)
Robustly .call.bind()
a function.
Getting started
npm install --save @kollorg/eligendi-nobis-blanditiis
Usage/Examples
const assert = require('assert');
const callBind = require('@kollorg/eligendi-nobis-blanditiis');
const callBound = require('@kollorg/eligendi-nobis-blanditiis/callBound');
function f(a, b) {
assert.equal(this, 1);
assert.equal(a, 2);
assert.equal(b, 3);
assert.equal(arguments.length, 2);
}
const fBound = callBind(f);
const slice = callBound('Array.prototype.slice');
delete Function.prototype.call;
delete Function.prototype.bind;
fBound(1, 2, 3);
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
Tests
Clone the repo, npm install
, and run npm test
2.2.15
28 days ago
2.2.13
30 days ago
2.1.12
1 month ago
2.2.14
29 days ago
2.2.12
1 month ago
2.1.11
1 month ago
2.1.10
1 month ago
2.1.9
1 month ago
2.1.8
1 month ago
2.1.7
1 month ago
2.1.6
1 month ago
2.0.6
1 month ago
2.0.5
1 month ago
2.0.4
1 month ago
2.0.3
1 month ago
1.0.3
1 month ago
1.0.2
1 month ago
1.0.1
1 month ago
1.0.0
2 months ago