https://github.com/anthonyshort/virtualize-diff
Create a diff between two virtualize nodes
https://github.com/anthonyshort/virtualize-diff
Last synced: about 2 months ago
JSON representation
Create a diff between two virtualize nodes
- Host: GitHub
- URL: https://github.com/anthonyshort/virtualize-diff
- Owner: anthonyshort
- Created: 2015-03-15T00:42:47.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-15T22:13:43.000Z (about 10 years ago)
- Last Synced: 2025-01-30T21:30:01.036Z (3 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# virtualize-diff
Create a diff between two [virtualize](https://github.com/anthonyshort/virtualize) nodes.
```
npm install virtualize-diff
```## Usage
```js
var node = require('virtualize').node;
var diff = require('virtualize-diff');var left = node('h1', 'Hello World');
var right = node('h1', 'Hello Pluto');var changes = diff(left, right);
``````json
[{
"path": "0.0",
"type": "text.update",
"value": "Hello Pluto"
}]
```