{"id":22730244,"url":"https://github.com/ert78gb/js-crud-diff","last_synced_at":"2025-04-13T23:14:22.126Z","repository":{"id":25700987,"uuid":"105859846","full_name":"ert78gb/js-crud-diff","owner":"ert78gb","description":"Simple object diff tool","archived":false,"fork":false,"pushed_at":"2024-12-04T14:17:33.000Z","size":262,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T23:14:11.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ert78gb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-10-05T07:12:21.000Z","updated_at":"2024-12-28T22:06:11.000Z","dependencies_parsed_at":"2024-06-10T19:04:43.368Z","dependency_job_id":"dd58c441-22fa-48f7-bb17-d2a5484023c9","html_url":"https://github.com/ert78gb/js-crud-diff","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/ert78gb%2Fjs-crud-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ert78gb%2Fjs-crud-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ert78gb%2Fjs-crud-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ert78gb%2Fjs-crud-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ert78gb","download_url":"https://codeload.github.com/ert78gb/js-crud-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794569,"owners_count":21162615,"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":[],"created_at":"2024-12-10T18:13:56.146Z","updated_at":"2025-04-13T23:14:22.095Z","avatar_url":"https://github.com/ert78gb.png","language":"JavaScript","readme":"js-crud-diff\n============\n\nCreate a difference of the to object\n\n```javascript\n\nconst before = {\n      a: {\n        b: {\n          c: '',\n          d: {\n            e: '',\n            g: ''\n          }\n        }\n      },\n      a2: {\n        b2: '',\n        c2: ''\n      }\n    }\n    const after = {\n      a: {\n        b: {\n          c: '',\n          d: {\n            e: ''\n          }\n        },\n        newProp: {\n          a: ''\n        }\n      },\n      a2: {\n        b2: 'asa'\n      }\n    }\n\n    const difference = diff(before, after)\n    // value of the difference\n    // {\n    //   a: {\n    //     b: {\n    //       d: {\n    //         g: { // g deleted. original value was an empty string\n    //           deleted: ''\n    //         }\n    //       }\n    //     },\n    //     newProp: { // newProp created with value {a: ''}\n    //       created: {\n    //         a: ''\n    //       }\n    //     }\n    //   },\n    //   a2: {\n    //     b2: { // b2 modified\n    //       after: 'asa', // new value\n    //       before: '' // original value\n    //     },\n    //     c2: { // c2 deleted original value was an empty string\n    //       deleted: ''\n    //     }\n    //   }\n    // }\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fert78gb%2Fjs-crud-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fert78gb%2Fjs-crud-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fert78gb%2Fjs-crud-diff/lists"}