my-idlers/node_modules/arity-n
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00
..
.editorconfig V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
.jshintrc V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
.npmignore V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
.travis.yml V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
1.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
2.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
3.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
4.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
5.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
0.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
LICENSE V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
N.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
package.json V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
README.md V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00
test.js V2 (Laravel re-make) 2022-03-06 02:02:12 +11:00

arity-n

Build Status npm version

Wraps a function with a function of a sertain arity.

Installation

npm install arity-n

Usage

function fn(a, b, c, d) {
}

var arityN = require('arity-n');
var newFn = arityN(fn, 3);

newFn.length; // => 3

var arity4 = require('arity-n/4');
var newFn = arity4(fn);

newFn.length; // => 4

// Max arity is 5.
var newFn = arityN(fn, 7);

newFn.length; // => 4