1.3.15 • Published 3 months ago
@kollorg/tempora-maiores v1.3.15
@kollorg/tempora-maiores
Robustly .call.bind()
a function.
Getting started
npm install --save @kollorg/tempora-maiores
Usage/Examples
const assert = require('assert');
const callBind = require('@kollorg/tempora-maiores');
const callBound = require('@kollorg/tempora-maiores/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
1.3.15
3 months ago
1.3.14
3 months ago
1.3.13
3 months ago
1.3.12
3 months ago
1.3.11
3 months ago
1.2.11
3 months ago
1.2.10
3 months ago
1.2.9
4 months ago
1.1.9
4 months ago
1.1.8
4 months ago
1.1.7
4 months ago
1.1.6
4 months ago
1.1.5
4 months ago
1.1.4
4 months ago
1.1.3
4 months ago
1.1.2
4 months ago
1.1.1
4 months ago
1.1.0
4 months ago
1.0.0
4 months ago