UNPKG

date-fns

Version:

Modern JavaScript date utility library

12 lines (10 loc) 290 B
export default function convertToFP(fn, arity, a) { a = a || []; if (a.length >= arity) { return fn.apply(null, a.slice(0, arity).reverse()); } return function () { var args = Array.prototype.slice.call(arguments); return convertToFP(fn, arity, a.concat(args)); }; }