{"id":47956794,"url":"https://github.com/pomgui/deep","last_synced_at":"2026-04-04T09:34:48.346Z","repository":{"id":57683437,"uuid":"481205485","full_name":"pomgui/deep","owner":"pomgui","description":"Ultrasmall footprint -- lodash.merge compatible, JSON diff \u0026 patch utilities","archived":false,"fork":false,"pushed_at":"2025-09-13T00:53:46.000Z","size":271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T02:42:15.597Z","etag":null,"topics":["json-diff","json-patch","merge"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pomgui.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-13T12:22:55.000Z","updated_at":"2025-09-13T00:53:48.000Z","dependencies_parsed_at":"2025-06-16T10:37:26.835Z","dependency_job_id":"c1f2c408-06ce-4292-9067-5a2f58de65d3","html_url":"https://github.com/pomgui/deep","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/pomgui/deep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdeep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdeep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdeep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdeep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomgui","download_url":"https://codeload.github.com/pomgui/deep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdeep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31394913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T09:13:02.600Z","status":"ssl_error","status_checked_at":"2026-04-04T09:13:01.683Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["json-diff","json-patch","merge"],"created_at":"2026-04-04T09:34:47.814Z","updated_at":"2026-04-04T09:34:48.331Z","avatar_url":"https://github.com/pomgui.png","language":"JavaScript","readme":"# Deep\n\nUltra small footprint merge \u0026 freeze methods.\n\n### deepMerge\nThis method is like `assign` except that it recursively merges own and\ninherited enumerable string keyed properties of source objects into the\ndestination object. Source properties that resolve to `undefined` are\nskipped if a destination value exists. Array and plain object properties\nare merged recursively. Other objects and value types are overridden by\nassignment. Source objects are applied from left to right. Subsequent\nsources overwrite property assignments of previous sources.\n\nFor the most cases it is compatible with \n[lodash.merge](https://www.npmjs.com/package/lodash.merge) package.\n\n### deepFreeze\nThis method executes an recursive Object.freeze.\n\n### diff\nCompares two JSON objects and returns the delta (difference), optimizing bandwidth usage—ideal for PATCH requests in REST services.\n\n### patch\nTakes the diff's result and applies it into a JSON object, reconstructing the most recent version.\n\n## Installation\n\nUsing npm:\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save @pomgui/deep\n```\n\nIn Node.js:\n```js\nvar { deepMerge } = require('@pomgui/deep');\n```\n\nWith typescript:\n ```typescript\nimport { deepMerge } from '@pomgui/deep';\nimport { diff, patch } from '@pomgui/deep';\n```\n\n## Usage\n\n### deepMerge\n\n```js\nconst object = {\n  'a': [{ 'b': 2 }, { 'd': 4 }]\n}\nconst other = {\n  'a': [{ 'c': 3 }, { 'e': 5 }]\n}\ndeepMerge(object, other)\n// =\u003e { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n\n### deepFreeze\n\nconst frozen = deepFreeze(obj);\n// frozen === obj\n\nconst frozenArr = deepFreeze(obj1, obj2, obj3);\n// frozenArr[0] === obj1\n// frozenArr[1] === obj2\n// frozenArr[2] === obj3\n\n```\n\n### diff \u0026 patch\n\n```js\nconst a = {\n  foo: {\n    bar: {\n      a: [\"a\", \"b\"],\n      b: 2,\n      c: [\"x\", \"y\"],\n      e: 100,\n    },\n  },\n  buzz: \"world\",\n};\n\nconst b = {\n  foo: {\n    bar: {\n      a: [\"a\"],\n      b: 2,\n      c: [\"x\", \"y\", \"z\"],\n      d: \"Hello, world!\",\n    },\n  },\n  buzz: \"fizz\",\n};\n\nexpect(patch(a, diff(a, b))).toEqual(b);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomgui%2Fdeep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomgui%2Fdeep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomgui%2Fdeep/lists"}