UNPKG

json-logic-engine

Version:

Construct complex rules with JSON & process them.

9 lines (8 loc) 309 B
/** * Counts the number of arguments a function has; paying attention to the function's signature * to avoid edge cases. * This is used to allow for compiler optimizations. * @param {(...args: any[]) => any} fn * @returns {number} */ export function countArguments(fn: (...args: any[]) => any): number;