{"id":16014663,"url":"https://github.com/boraseoksoon/cljs-merge","last_synced_at":"2026-04-09T08:44:28.187Z","repository":{"id":57200496,"uuid":"297712834","full_name":"boraseoksoon/cljs-merge","owner":"boraseoksoon","description":"Merge jsons into a single one.","archived":false,"fork":false,"pushed_at":"2021-03-28T02:45:58.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T22:58:49.768Z","etag":null,"topics":["clojure","clojurescript","deep-merge","javascript","join","json","jsons","merge","nodejs","objects","replace","two"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cljs-merge","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boraseoksoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-22T16:48:00.000Z","updated_at":"2021-03-28T02:46:00.000Z","dependencies_parsed_at":"2022-09-16T15:10:35.175Z","dependency_job_id":null,"html_url":"https://github.com/boraseoksoon/cljs-merge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcljs-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcljs-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcljs-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcljs-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boraseoksoon","download_url":"https://codeload.github.com/boraseoksoon/cljs-merge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280180,"owners_count":20912965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","deep-merge","javascript","join","json","jsons","merge","nodejs","objects","replace","two"],"created_at":"2024-10-08T15:04:33.503Z","updated_at":"2026-04-09T08:44:28.145Z","avatar_url":"https://github.com/boraseoksoon.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"## cljs-merge\n'cljs-merge' recursively merges two jsons into a unified one, excluding null or undefined in the same order.\n\n[![NPM Version][npm-image]][npm-url]\n\n\n```javascript\nconst { merge } = require('cljs-merge')\n\nconst js1 = { k1: \"v1\", k2: \"v2\", k3: \"v3\" }\nconst js2 = { k1: \"v1\", k2: undefined, k4: \"v4\", k5: \"v5\", k6: null }\n\nconst res = merge({ src:js1, target: js2 })\nconsole.log(\"res ==\u003e \", res);\n// res ==\u003e { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }\n```\n\n```javascript\nconst { merge } = require(\"cljs-merge\")\n\nconst src = {\t\n\tkey1: \"1\",\n\tkey2: \"2\",\n\tkey3: \"3\",\n\tkey4: \"4\",\n\tkey5: {\n\t\tkey22: null,\n\t\tkey11: \"10\",\n\t\tkey33: \"30\"\n\t},\n\tspecial: \"BORA\"\n}\n\nconst target = {\t\n\tkey1: \"10\",\n\tkey3: null,\n\tkey4: \"40\",\n\tkey5: {\n\t\tkey11: null,\n\t\tkey22: \"200\",\n\t\tkey33: null\n\t}, \n\tkey6: \"6\", \n\tquit: -1\n}\n\nconst res = merge({ src, target })\n\nconsole.log(\"res ==\u003e \", res);\n// res ==\u003e \n// {\t\n// \tkey1: \"10\",\n// \tkey2: \"2\",\n// \tkey3: \"3\",\n// \tkey4: \"40\"\n//  key5: {\n// \t\tkey11: \"10\", \n// \t\tkey22: \"200\", \n// \t\tkey33: \"30\", \n// \t}\n// \tkey6: \"6\", \n// \tspecial: \"BORA\"\n//  quit: -1\n// }\n```\n\n## Installation for Node.js\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/).\n\nBefore installing, [download and install Node.js](https://nodejs.org/en/download/).\nNode.js 0.10 or higher is required.\n\nIf this is a brand new project, make sure to create a `package.json` first with\nthe [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).\n\nInstallation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```bash\n$ npm install cljs-merge\n```\n\n## Installation for Web Browser \n\nCDN\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n\t\u003cmeta charset=\"UTF-8\"\u003e\n\t\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n\t\u003ctitle\u003eDocument\u003c/title\u003e\n\t\u003cscript src=\"https://cdn.jsdelivr.net/npm/cljs-merge@1.1.1/cljs_dist/core/web/cljs.js\"\u003e\u003c/script\u003e\n\t\u003cscript\u003e\n\t\tconst { merge } = cljs.merge.core\n\t\t\n\t\tconst src = {\n\t\t\tk1: \"v1\",\n\t\t\tk2: \"v2\",\n\t\t\tk3: \"v3\"\n\t\t}\n\t\n\t\tconst target = {\n\t\t\tk1: \"v1\",\n\t\t\tk2: undefined,\n\t\t\tk4: \"v4\",\n\t\t\tk5: \"v5\",\n\t\t\tk6: null\n\t\t}\n\t\n\t\tconst res = merge({ src, target })\n\t\t\n\t\tconsole.log(\"res ==\u003e \", res);\n\t\t// res ==\u003e { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }\n\t\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n```html\n\t\u003cscript src=\"https://cdn.jsdelivr.net/npm/cljs-merge@1.1.1/cljs_dist/core/web/cljs.js\"\u003e\u003c/script\u003e\n\t\u003cscript\u003e\n\t\tconst { merge } = cljs.merge.core\n\t\t\n\t\tconst src = {\n\t\t\tk1: \"v1\",\n\t\t\tk2: \"v2\",\n\t\t\tk3: \"v3\"\n\t\t}\n\t\n\t\tconst target = {\n\t\t\tk1: \"v1\",\n\t\t\tk2: undefined,\n\t\t\tk4: \"v4\",\n\t\t\tk5: \"v5\",\n\t\t\tk6: null\n\t\t}\n\t\n\t\tconst res = merge({ src, target })\n\t\t\n\t\tconsole.log(\"res ==\u003e \", res);\n\t\t// res ==\u003e { k1: 'v1', k2: 'v2', k3: 'v3', k4: 'v4', k5: 'v5' }\n\t\u003c/script\u003e\n```\n\n## Contributing\n\n[Contributing Guide](Contributing.md)\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/express.svg\n[npm-url]: https://npmjs.org/package/express\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2Fcljs-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboraseoksoon%2Fcljs-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2Fcljs-merge/lists"}