This commit is contained in:
root committed 2023-07-30 22:05:51 +02:00
1 parent 65a0be1350
commit 06acaecee1
12267 files changed
+671638 -15

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
export default function convertToFP(fn, arity) {
var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
if (a.length >= arity) {
return fn.apply(null, a.slice(0, arity).reverse());
}
return function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return convertToFP(fn, arity, a.concat(args));
};
}