# cljs-merge

> 'cljs-merge' recursively merges two jsons into a unified one.

Latest version **1.1.1** (published 2020-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install cljs-merge
pnpm add cljs-merge
yarn add cljs-merge
bun add cljs-merge
```

## 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.1.1 |
| Published | 2020-09-23 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 408.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jang seoksoon |
| Maintainers | boraseoksoon |
| Keywords | json, merge, clojurescript, clojure, deep-merge, deep, replace, compare, null, undefined, combine, object, two objects, javascript, Javascript |

## Links

- npm: https://www.npmjs.com/package/cljs-merge
- Repository: https://github.com/boraseoksoon/cljs-merge
- Homepage: https://github.com/boraseoksoon/cljs-merge#readme
- Issues: https://github.com/boraseoksoon/cljs-merge/issues
- npm.io page: https://npm.io/package/cljs-merge

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.1 (latest) — 2020-09-23
- 1.1.0 — 2020-09-23
- 1.0.9 — 2020-09-23
- 1.0.8 — 2020-09-23
- 1.0.7 — 2020-09-23
- 1.0.6 — 2020-09-23
- 1.0.5 — 2020-09-23
- 1.0.4 — 2020-09-22
- 1.0.2 — 2020-09-22
- 1.0.1 — 2020-09-22
- 1.0.0 — 2020-09-22

## README

## cljs-merge
'cljs-merge' recursively merges two jsons into a unified one.

[![NPM Version][npm-image]][npm-url]


```javascript
const { merge } = require("cljs-merge")

const js1 = { k1: "v1", k2: "v2", k3: "v3" }
const js2 = { k1: "v1", k2: undefined, k4: "v4", k5: "v5", k6: null }

const res = merge({src:js1, target: js2})

console.log(res);
// { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }
```

```javascript
const { merge } = require("cljs-merge")

const js1 = {	
	key1: "1",
	key2: "2",
	key3: "3",
	key4: "4",
	key5: {
		key22: null,
		key11: "10",
		key33: "30"
	},
	special: "BORA"
}
const js2 = {	
	key1: "10",
	key3: null,
	key4: "40",
	key5: {
		key11: null,
		key22: "200",
		key33: null
	}, 
	key6: "6", 
	quit: -1
}

const res = merge({src:js1, target:js2})

console.log(res) 
// res => 
// {	
// 	key1: "10",
// 	key2: "2",
// 	key3: "3",
// 	key4: "40"
//  key5: {
// 		key11: "10", 
// 		key22: "200", 
// 		key33: "30", 
// 	}
// 	key6: "6", 
// 	special: "BORA"
//  quit: -1
// }
```

## Installation for Node.js

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/).

Before installing, [download and install Node.js](https://nodejs.org/en/download/).
Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a `package.json` first with
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).

Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```bash
$ npm install cljs-merge
```

## Installation for Web Browser 

CDN

```html
<script src="https://cdn.jsdelivr.net/npm/cljs-merge@1.0.4/cljs-merge.js"></script>

<script>
const cljs = require("cljs-merge")

const js1 = { k1: "v1", k2: "v2", k3: "v3" }
const js2 = { k1: "v1", k2: undefined, k4: "v4", k5: "v5", k6: null }

const res = cljs.merge({src:js1, target: js2})
console.log(res);
// { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }
</script>
```

## Contributing

[Contributing Guide](Contributing.md)

## License

[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/express.svg
[npm-url]: https://npmjs.org/package/express

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