deep-clone-json
v1.0.1
Published
Extremely fast deep cloner specialized for serializable objects and standard types.
Maintainers
Readme
deep-clone-json
Why use deep-clone-json? Cloning objects in JS is slow or complex.
structuredCloneis slow.JSON.parse(JSON.stringify)is fast but drops date structures and drops undefined values.
An ultra-fast recursive cloner specialized for serializable objects and standard types, outperforming built-in clone utilities.
⚡ Features
- Blazing-fast cloning performance
- Supports nested objects, arrays, primitives
- Safe handling of undefined and Date objects
📦 Installation
npm i deep-clone-json🚀 Usage
import { deepClone } from 'deep-clone-json';
const original = { a: 1, b: { c: [true, undefined, new Date()] } };
const cloned = deepClone(original);
console.log(cloned);⚙️ API Reference
deepClone(obj)
- Returns a deep clone of the target object.
📺 Demonstration

📄 License
MIT License.
