This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/function/wrap.mjs
T

12 lines
327 B
JavaScript

import { identity } from '../../function/identity.mjs';
import { isFunction } from '../../predicate/isFunction.mjs';
function wrap(value, wrapper) {
return function (...args) {
const wrapFn = isFunction(wrapper) ? wrapper : identity;
return wrapFn.apply(this, [value, ...args]);
};
}
export { wrap };