@web3r/flowerkit
Version:
A collection of more than 60 often used utility JS functions that simplify frontend development.
17 lines • 536 B
TypeScript
/**
* Evaluating functions with multiple arguments and decomposing them into a sequence of functions with a specific number of arguments
* @param fn{Function} - source function
* @param arity{Number=} - arity of function
* @return {Function}
* @example
* // How to curry a function?
*
* function getSum(a, b) {
* return a + b;
* }
*
* const getCurriedSum = getCurryFn(getSum);
* curriedSum(1)(2); // 3
*/
export function getCurryFn(fn: Function, arity?: number | undefined): Function;
//# sourceMappingURL=index.d.ts.map