fix(js): deepFreeze recurses below already-frozen parents

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-28 23:39:46 +01:00
co-authored by Claude Sonnet 5.5
parent 22c221a042
commit e9c41fed03
3 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -15,5 +15,5 @@ export const pipe = (x, ...fns) => todo('m01')
/** `compose(f, g)(x)` is `f(g(x))`: functions applied right to left. */
export const compose = (...fns) => todo('m01')
/** Freeze `obj` and everything reachable from it, then return it (same object). */
/** Freeze `obj` and everything reachable from it (even below already-frozen parents; cycles are fine), then return it (same object). */
export const deepFreeze = (obj) => todo('m01')