UNPKG

mxs

Version:

⚔️ Lightweight functional JavaScript utilities

16 lines (15 loc) 424 B
type Func = (...args: any[]) => any; /** * A function that takes multiple arguments and returns a curried method. * * @category Function * @param {Function} fn - the function to curry * @returns {Function} the curried method with arguments * * @example * const sum = (a, b, c) => a + b + c * const curriedSum = curry(sum) * curriedSum(1)(2, 3) //=> 6 */ export declare const curry: (fn: Func) => Func; export {};