{"id":13422646,"url":"https://github.com/bluepeter/jsondiffpatch-react","last_synced_at":"2025-04-09T21:31:53.622Z","repository":{"id":57285694,"uuid":"375407295","full_name":"bluepeter/jsondiffpatch-react","owner":"bluepeter","description":"Diff \u0026 patch JavaScript objects... in React","archived":false,"fork":false,"pushed_at":"2023-07-11T13:35:58.000Z","size":151,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T10:44:41.279Z","etag":null,"topics":["diffmatchpatch","react","reactjs"],"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/bluepeter.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}},"created_at":"2021-06-09T15:40:13.000Z","updated_at":"2024-08-12T02:58:49.000Z","dependencies_parsed_at":"2024-01-07T18:09:33.481Z","dependency_job_id":null,"html_url":"https://github.com/bluepeter/jsondiffpatch-react","commit_stats":{"total_commits":38,"total_committers":8,"mean_commits":4.75,"dds":0.5789473684210527,"last_synced_commit":"0534109ed01623ddf25f2b33e4836287039b12ea"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluepeter%2Fjsondiffpatch-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluepeter%2Fjsondiffpatch-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluepeter%2Fjsondiffpatch-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluepeter%2Fjsondiffpatch-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluepeter","download_url":"https://codeload.github.com/bluepeter/jsondiffpatch-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114747,"owners_count":21050103,"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":["diffmatchpatch","react","reactjs"],"created_at":"2024-07-30T23:00:49.344Z","updated_at":"2025-04-09T21:31:53.264Z","avatar_url":"https://github.com/bluepeter.png","language":"JavaScript","readme":"# jsondiffpatch-react\n\n- Originally forked from archived\n  https://github.com/hero-guo/jsondiffpatch-for-react\n- Based on https://github.com/benjamine/jsondiffpatch\n\n# 1. install\n\n    npm install jsondiffpatch-react\n\n# 2. usage\n\n```jsx\nimport React from 'react';\nimport JsonDiffReact from 'jsondiffpatch-react';\n\n\u003cJsonDiffReact\n    right: PropTypes.any,\n    left: PropTypes.any,\n    show: PropTypes.bool,\n    annotated: PropTypes.bool,\n    tips: PropTypes.any,\n    objectHash: PropTypes.func,\n/\u003e\n```\n\n# 3. component props\n\n- `left` (array, object, string)\n\n- `right` (array, object, string)\n\n- `show` (bool)\n\n  you can show/hide unchanged values\n\n- `annotated` (bool)\n\n  This will render the original JSON delta in html, with annotations aside\n  explaining the meaning of each part. This attempts to make the JSON delta\n  format self-explained.\n\n- `tips` (any)\n\n  Displayed in case both elements are identical.\n\n- `objectHash` (function)\n\n  Will be passed to _jsondiffpatch_ to improve array comparison performance, as\n  described\n  [here](https://github.com/benjamine/jsondiffpatch/blob/master/docs/arrays.md#an-example-using-objecthash).\n  Example:\n\n  ```jsx\n  \u003cJsonDiffReact\n    left={left}\n    right={right}\n    objectHash={(obj: any) =\u003e\n      obj.id || obj._id || obj.name || JSON.stringify(obj)\n    }\n  /\u003e\n  ```\n\n# Development notes\n\nTo publish to NPM, change the version number in `package.json` and `npm publish`\nonce complete. Then, go to Github Releases and follow the instructions to\npublish a new version there too.\n","funding_links":[],"categories":["Miscellaneous"],"sub_categories":["Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluepeter%2Fjsondiffpatch-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluepeter%2Fjsondiffpatch-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluepeter%2Fjsondiffpatch-react/lists"}