cljs-merge
'cljs-merge' recursively merges two jsons into a unified one.
const merge = const js1 = k1: "v1" k2: "v2" k3: "v3" const js2 = k1: "v1" k2: undefined k4: "v4" k5: "v5" k6: null const res = console;// { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }
const 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 = console // 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 module available through the npm registry.
Before installing, download and install Node.js. 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.
Installation is done using the
npm install
command:
$ npm install cljs-merge
Installation for Web Browser
CDN