DeepClone
Utility for cloning objects and arrays so you can manipulate them without borking your original data
Install / Use
/learn @Rich-Harris/DeepCloneREADME
deepClone.js
Simple utility to deep clone objects and arrays, for when you want to modify or transform data without borking the original.
a = { one: 1, two: 2, three: 3 };
b = a;
b.four = 4;
console.log( a.four ); // 4
a = { one: 1, two: 2, three: 3};
b = deepClone( a );
b.four = 4;
console.log( a.four ); // undefined
Not exactly rocket science. Just a handy thing to have lying around. Doesn't check for cyclical references, so if you get stuck in an infinite loop it's you're own fault.
MIT licensed.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
