Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanoclone

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoclone

290B to deep clone JavaScript objects

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6M
increased by4.25%
Maintainers
1
Weekly downloads
 
Created

What is nanoclone?

The nanoclone npm package is a lightweight utility for deep cloning JavaScript objects. It is designed to be simple and efficient, making it a useful tool for copying objects without retaining references to the original objects.

What are nanoclone's main functionalities?

Deep Cloning

This feature allows you to create a deep copy of an object, ensuring that nested objects are also cloned and not just referenced.

const clone = require('nanoclone');
const original = { a: 1, b: { c: 2 } };
const copy = clone(original);
console.log(copy); // { a: 1, b: { c: 2 } }
console.log(copy.b === original.b); // false

Other packages similar to nanoclone

Keywords

FAQs

Package last updated on 31 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc