UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

15 lines (12 loc) 285 B
import { clone } from './clone.mjs'; function cloneWith(value, customizer) { if (!customizer) { return clone(value); } const result = customizer(value); if (result !== undefined) { return result; } return clone(value); } export { cloneWith };