You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
243 B
17 lines
243 B
4 years ago
|
var arityFn = [
|
||
|
require('./0'),
|
||
|
require('./1'),
|
||
|
require('./2'),
|
||
|
require('./3'),
|
||
|
require('./4'),
|
||
|
require('./5')
|
||
|
];
|
||
|
|
||
|
module.exports = function(fn, n) {
|
||
|
if (n && n <= 5) {
|
||
|
return arityFn[n](fn);
|
||
|
} else {
|
||
|
return fn;
|
||
|
}
|
||
|
};
|