Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm
Package summary
Share
0
issues
1
license
5
MIT
Package created
2 Oct 2014
Version published
22 Nov 2018
Maintainers
2
Total deps
5
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
clone-deep@4.0.1
is-plain-object@2.0.4
isobject@3.0.1
kind-of@6.0.3
shallow-clone@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of clone-deep 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
is-plain-object2.0.42.96 kBMIT
prod
kind-of6.0.37.47 kBMIT
prod
shallow-clone3.0.13.58 kBMIT
prod

Visualizations

Frequently Asked Questions

What does clone-deep do?

Clone-deep is a highly useful library in JavaScript that can recursively deep clone JavaScript native types. This includes Objects, Arrays, RegExps, Dates, as well as primitive types. The ability to deeply copy these types, rather than just merely referencing them, becomes extremely beneficial in ensuring data sanctity in your code and preventing any unseen side effects.

How do you use clone-deep?

To use clone-deep, you first need to install the module from npm using the command: npm install --save clone-deep. Once installed, you can import clone-deep into your JavaScript file using const cloneDeep = require('clone-deep');.

Here is a practical example of usage:

const cloneDeep = require('clone-deep');

let obj = { a: 'b' };
let arr = [obj];
let copy = cloneDeep(arr);
obj.c = 'd';

console.log(copy); // Outputs: [{ a: 'b' }]
console.log(arr); // Outputs: [{ a: 'b', c: 'd' }]

In this example, despite modifying the original object (obj) after cloning the array containing it, the cloned array (copy) remains unaffected because it holds a deep clone of the original object.

Where are the clone-deep docs?

The complete documentation for clone-deep can be found in its README file on its GitHub repository located at: https://github.com/jonschlinkert/clone-deep. The README includes a comprehensive guide on how to install, use, and test the library, as well as other relevant details such as its license and contributing guidelines.