{"id":19346348,"url":"https://github.com/canjs/dom-diff","last_synced_at":"2025-04-23T04:36:54.967Z","repository":{"id":34496186,"uuid":"38436563","full_name":"canjs/dom-diff","owner":"canjs","description":"Diffing for a DOM-like DOM.","archived":false,"fork":false,"pushed_at":"2017-07-22T01:02:12.000Z","size":26,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-16T01:51:34.919Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-02T14:12:58.000Z","updated_at":"2020-04-02T00:46:15.000Z","dependencies_parsed_at":"2022-09-17T07:22:37.538Z","dependency_job_id":null,"html_url":"https://github.com/canjs/dom-diff","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fdom-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fdom-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fdom-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fdom-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canjs","download_url":"https://codeload.github.com/canjs/dom-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372530,"owners_count":21419719,"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-11-10T04:09:56.974Z","updated_at":"2025-04-23T04:36:54.651Z","avatar_url":"https://github.com/canjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dom-diff\n\nCreates diffs of DOM or a virtual DOM that looks like the real DOM.\n\n## Installation\n\n```\nnpm install dom-diff --save\n```\n\n## Usage\n\n```js\nvar diff = require(\"dom-diff/diff\");\nvar apply = require(\"dom-diff/patch\");\n\nvar a = document.createElement(\"div\");\nvar b = document.createElement(\"div\");\n\nb.appendChild(document.createElement(\"span\"));\n\nvar patches = diff(a, b);\napply(a, patches);\n```\n\n## Modules\n\n### dom-diff/diff\n\n```\ndiff(Element, Element) -\u003e patches\n```\n\nGiven two elements, diffs them and returns an object containing patches.\n\n### dom-diff/patch\n\n```\npatch(Element, patches)\n```\n\nGiven an element and a set of patches, the patches will be applied to the element.\n\n### dom-diff/serialize\n\n```\nserialize(patches) -\u003e serializedPatches\n```\n\nGiven a `patches` object will serialize it into a plain object that can be sent across WebWorker boundaries. You can further serialize this object to JSON if you need to send it across the network.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fdom-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanjs%2Fdom-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fdom-diff/lists"}