# @x82-softworks/clone-merge

> A recursive merge utility

Latest version **0.1.3** (published 2021-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @x82-softworks/clone-merge
pnpm add @x82-softworks/clone-merge
yarn add @x82-softworks/clone-merge
bun add @x82-softworks/clone-merge
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2021-05-11 |
| First published | 2021-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | opensource |
| Maintainers | x82-softworks |
| Keywords | recursive, merge, extend, functional, new object |

## Links

- npm: https://www.npmjs.com/package/@x82-softworks/clone-merge
- npm.io page: https://npm.io/package/@x82-softworks/clone-merge

## Dependencies (1)

- [is-array](https://npm.io/package/is-array.md) ^1.0.1

## Recent versions

- 0.1.3 (latest) — 2021-05-11
- 0.1.2 — 2021-04-20
- 0.1.1 — 2021-03-22
- 0.1.0 — 2021-03-22

## README

# @x82-softworks/clone-merge

*A recursive merge utility*

Recursively merges objects together. Can be configured to use deep  merging, as well as shallow copying as well. The returned object is a new object to prevent mutable read/write problemns

## Autogenerated docs

https://x82-open-source.gitlab.io/npm/clone-merge

## Usage
```js
import cloneMerge,{ DEEP,SHALLOW } from '@x82-softworks/clone-merge';

let std = cloneMerge(
{
    x: {
        y:1,
        z:3
    }
},
{
    x:{
        y:2,
    }
});
/* {
    x:{
        y:2
    }
} */

let deep = cloneMerge(DEEP,
{
    x: {
        y:1,
        z:3
    }
},
{
    x:{
        y:2,
    }
});
/* {
    x:{
        y:2,
        z:3
    }
} */


 let x = 
 {
    foo: 'bar'
};
let shallow = lib(SHALLOW, {
    x
}, {
    q: {
        y: 2
    }
});
// shallow.x === x shallow equality


```

---
_Source: https://npm.io/package/@x82-softworks/clone-merge · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
