Irina Glushko 2389e7160b HW1 done 3 rokov pred
..
.editorconfig 2389e7160b HW1 done 3 rokov pred
.jshintrc 2389e7160b HW1 done 3 rokov pred
.npmignore 2389e7160b HW1 done 3 rokov pred
.travis.yml 2389e7160b HW1 done 3 rokov pred
0.js 2389e7160b HW1 done 3 rokov pred
1.js 2389e7160b HW1 done 3 rokov pred
2.js 2389e7160b HW1 done 3 rokov pred
3.js 2389e7160b HW1 done 3 rokov pred
4.js 2389e7160b HW1 done 3 rokov pred
5.js 2389e7160b HW1 done 3 rokov pred
LICENSE 2389e7160b HW1 done 3 rokov pred
N.js 2389e7160b HW1 done 3 rokov pred
README.md 2389e7160b HW1 done 3 rokov pred
package.json 2389e7160b HW1 done 3 rokov pred
test.js 2389e7160b HW1 done 3 rokov pred

README.md

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