TypeScript Tested
Typed Object.keys and Object.entries
Helpers that keep key types instead of widening to string, for objects you know the shape of.
Loading snippets…
5 snippets
Helpers that keep key types instead of widening to string, for objects you know the shape of.
Build a new object with only some keys, or without some keys, without mutating the original.
Recursively merge configuration objects without mutating the inputs and without prototype pollution.
Compare two values structurally, including nested objects, arrays, Dates, Maps and Sets.
Copy nested objects, arrays, Maps, Sets and Dates without sharing references, using the built-in structuredClone.