JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 166
  • Score
    100M100P100Q76292F

a realtime tree diffing algorithm

Package Exports

  • vtree/diff
  • vtree/handle-thunk
  • vtree/is-thunk
  • vtree/is-vhook
  • vtree/is-vnode
  • vtree/is-vtext
  • vtree/is-widget
  • vtree/test/handle-thunk
  • vtree/version
  • vtree/vnode
  • vtree/vnode.js
  • vtree/vpatch
  • vtree/vtext
  • vtree/vtext.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vtree) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.

This module is currently re-exporting the vtree from virtual-dom, but the aim is to eventually make this a standalone module and have virtual-dom depend on vtree instead.

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