This commit is contained in:
lalBi94
2023-03-05 13:23:23 +01:00
commit 7bc56c09b5
14034 changed files with 1834369 additions and 0 deletions

16
node_modules/curri/index.next.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/**
* Function to curry any javascript method
* @param {Function} fn - the target function we want to curry
* @param {...[args]} acc - initial arguments
* @returns {Function|*} it will return a function until the target function
* will receive all of its arguments
*/
export default function curry(fn, ...acc) {
return (...args) => {
args = [...acc, ...args]
return args.length < fn.length ?
curry(fn, ...args) :
fn(...args)
}
}