Em dashes crept back into examples, docs/platform-native.md, several READMEs,
the ponytail-debt skill, and a command file since 88431de. Replaced with plain
punctuation (commas, matching the house convention), .openclaw mirror
regenerated. Follows 88431de's scope: leaves untouched the vendored caveman
SKILL.md and the dated benchmarks/results/ writeups (historical records).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
783 B
783 B
Deep Clone
Task: "Deep clone this object."
Without Ponytail
npm install lodash
import { cloneDeep } from "lodash";
const copy = cloneDeep(original);
Or the classic hack:
// fragile: loses Date, undefined, Map, Set, circular refs, functions
const copy = JSON.parse(JSON.stringify(original));
With Ponytail
// ponytail: structuredClone does this
const copy = structuredClone(original);
1 dependency (or a fragile hack) → 1 built-in. structuredClone handles Date, Map, Set, ArrayBuffer, RegExp, circular references, and more, everything JSON.parse/stringify silently drops. Available in every browser since 2022 and Node.js since v17. Pull lodash in when you need the rest of it, not for one function.