UNPKG

just-defer-call

Version:

The `deferCall` utility is a higher-order function that defers the execution of a given function until the returned function is called. It supports synchronous and asynchronous functions.

8 lines (7 loc) 106 B
// src/index.ts var deferCall = (fn, ...args) => () => { return fn(...args); }; export { deferCall };