maraisr/object-identityPublic

feat: objects with toJSON uses that for its identity

Objects with a `toJSON` method (URL, Temporal, custom types) now serialize
as whatever it returns.

+42B, perf-neutral on realistic shapes.
MRMarais Rossouw authored
0ff606ePatch
Parent5e8d86a
3 files changed+40-3
StackedSplit
lib/mod.test.ts+34 −2
lib/mod.ts+5 −0
readme.md+1 −1