UNPKG

softkave-js-utils

Version:

JavaScript & Typescript utility functions, types, and classes

9 lines 311 B
/** Returns a function that calls `afterFn` with the result of, and arguments of * `fn`. */ export function callAfterAsync(fn, afterFn) { return async (...args) => { const result = await fn(...args); return await afterFn(result, ...args); }; } //# sourceMappingURL=callAfterAsync.js.map