UNPKG

mocoolka-function

Version:

Function lib for function.

15 lines (14 loc) 620 B
/** * Returns a new function which is equivalent to the given function, * except that the new function's length property is equal to given length. * This does not limit the function to using that number of arguments. * It's only effect is on the reported length. * @since v0.1.0 * @keywords wrap * @param {number} length -The function parameter's number * @param {Function} fn - The function be wrap * @param {boolean} isNew - True register new Function * @return {Function} New function */ declare const arity: (length: number, fn: Function, isNew?: boolean) => Function; export default arity;