1.0.0 • Published 5 years ago

@n0n3br/clone-deep v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

clone-deep

Build Status Coverage Status

clone-deep is a little library you can use to clone your objects, no matter how deep they are.

Installation

Use the package manager npm to install clone-deep

npm install @n0n3br/clone-deep

Usage

ES6

import cloneDeep from "@n0n3br/clone-deep";
let a = { a: [1, 2, 3], b: [4, 5, 6] };
let b = cloneDeep(a);

CommonJS

var cloneDeep = require("@n0n3br/clone-deep").default;
var a = { a: [1, 2, 3], b: [4, 5, 6] };
var b = cloneDeep(a);

UMD in Browser

<!-- to import non-minified version -->
<script src="clone-deep.umd.js"></script>

<!-- to import minified version -->
<script src="clone-deep.umd.min.js"></script>

After this the library will be available to the Global as cloneDeep:

let a = { a: [1, 2, 3], b: [4, 5, 6] };
let b = cloneDeep(a);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Rogério Amorim
Rogério Amorim

See also the list of contributors who participated in this project.

License

MIT