# deep-cloner

> Deep cloning of arrays and objects.

Latest version **1.0.1** (published 2021-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install deep-cloner
pnpm add deep-cloner
yarn add deep-cloner
bun add deep-cloner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-11-24 |
| First published | 2021-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rupinder Singh |
| Maintainers | rupinder-developer |
| Keywords | deep-cloner |

## Links

- npm: https://www.npmjs.com/package/deep-cloner
- Repository: https://github.com/rupinder-developer/deep-cloner
- Homepage: https://github.com/rupinder-developer/deep-cloner#readme
- Issues: https://github.com/rupinder-developer/deep-cloner/issues
- npm.io page: https://npm.io/package/deep-cloner

## Recent versions

- 1.0.1 (latest) — 2021-11-24
- 1.0.0 — 2021-11-24

## README

# deep-cloner

This package offers _deep cloning_ of objects, arrays, numbers, strings, maps,
sets and dates in JavaScript.

## Installation

```sheel
$ npm install deep-cloner
```

## Example

```javascript
const clone = require('deep-cloner');

const x = { foo: { bar: 'bazinga' } };  // initial value of x
const y = clone(x);                     // clone x -> y

x.foo.bar = 'foo';                      // update x

console.log(x);               
console.log(y);                     
```

This will print:

```javascript
{ foo: { bar: 'foo' } }
{ foo: { bar: 'bazinga' } }
```

## API

### `clone(value)`
  * `value`: The value that you want to clone.

---
_Source: https://npm.io/package/deep-cloner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
