vtree

a realtime tree diffing algorithm

14 个版本
安装
npm install vtree
yarn add vtree
pnpm add vtree
bun add vtree
README

vtree

A realtime tree diffing algorithm

Motivation

vtree currently exists as part of virtual-dom. It is used for imitating diff operations between two vnode structures that imitate the structure of the active DOM node structure in the browser.

Example

var VNode = require("vtree/vnode")
var diff = require("vtree/diff")

var leftNode = new VNode("div")
var rightNode = new VNode("text")

var patches = diff(leftNode, rightNode)
/*
  -> {
    a: lefNode,
    0: vpatch<REPLACE>(rightNode) // a replace operation for the first node
  }
*/

Installation

npm install vtree

Contributors

  • Matt Esch

MIT Licenced

版本列表
0.0.22 2014-11-13
0.0.21 2014-10-05
0.0.20 2014-08-24
0.0.19 2014-07-29
0.0.18 2014-07-29
0.0.17 2014-07-29
0.0.16 2014-07-23
0.0.15 2014-07-22
0.0.14 2014-07-19
0.0.5 2014-07-12
0.0.4 2014-06-08
0.0.3 2014-06-02
0.0.2 2014-05-27
0.0.1 2014-04-19