flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
22
VISUALIZACION/node_modules/polished/lib/internalHelpers/_curry.js
generated
vendored
Executable file
22
VISUALIZACION/node_modules/polished/lib/internalHelpers/_curry.js
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = curry;
|
||||
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
// eslint-disable-next-line no-redeclare
|
||||
function curried(f, length, acc) {
|
||||
return function fn() {
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
||||
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
function curry(f) {
|
||||
// eslint-disable-line no-redeclare
|
||||
return curried(f, f.length, []);
|
||||
}
|
||||
module.exports = exports.default;
|
||||
Loading…
Add table
Add a link
Reference in a new issue