Deep Cloning Objects in JavaScript, the Modern Way

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Civic Auth - Auth in Less Than 5 Minutes
Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
www.civic.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. lodash

    A modern JavaScript utility library delivering modularity, performance, & extras.

    A lot of Lodash functions are implemented as combinations of other Lodash functions, so importing a single function actually imports half of Lodash under the hood:

    https://github.com/lodash/lodash/blob/main/src/.internal/bas...

  2. Civic Auth

    Auth in Less Than 5 Minutes. Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.

    Civic Auth logo
  3. mutative

    Efficient immutable updates, 2-6x faster than naive handcrafted reducer, and more than 10x faster than Immer.

    for those recommending Immer, check out Mutative or Limu instead (much faster)

    https://github.com/unadlib/mutative

    https://github.com/tnfe/limu

  4. limu

    High performance immutable lib alternative to immer with the same api, based on shallow copy on read and mark modified on write mechanism.

    for those recommending Immer, check out Mutative or Limu instead (much faster)

    https://github.com/unadlib/mutative

    https://github.com/tnfe/limu

  5. proposal-record-tuple

    ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!

    If you’re reaching for structuredClone, what you really want is native immutable Record and Tuple syntax, and the companion “deep path properties” syntax which allows for efficient and ergonomic immutable updates:

    - https://github.com/tc39/proposal-record-tuple

  6. LJSON

    JSON extended with pure functions.

  7. superjson

    Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.

    I wasn't aware of this, I would like to give a shout out to superjson (https://github.com/blitz-js/superjson) which I had been using to solve this problem. I will look at this solution for next time.

  8. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  9. monocle-ts

    Functional optics: a (partial) porting of Scala monocle

    Instead of the "deep path properties" syntax, you might want to take the opportunity to learn about functional lenses with monocle-ts

    https://gcanti.github.io/monocle-ts/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • TypeScript types can run DOOM [video]

    11 projects | news.ycombinator.com | 26 Feb 2025
  • Ramda: A practical functional library for JavaScript programmers

    7 projects | news.ycombinator.com | 4 Aug 2023
  • I created a CLI tool that writes unit tests with GPT-4 (with one command, I created tests for Lodash repo with 90% code coverage and found 13 bugs)

    2 projects | /r/typescript | 30 Jun 2023
  • Why doesn't TypeScript properly type Object.keys?

    3 projects | /r/typescript | 24 Jun 2023
  • TypeScript is 'not worth it' for developing libraries, says Svelte author, as team switches to JavaScript and JSDoc

    5 projects | /r/programming | 12 May 2023

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?