New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

300B to deep clone JavaScript objects

0.2.0
Source
npm
Version published
Weekly downloads
2.7M
-7.35%
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

clone

FAQs

Package last updated on 23 Jan 2018

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