N.js 243 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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; } };