New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seb-vdom

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seb-vdom

a simple implementation of vdom

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

seb-vdom Build Status codecov

An implementation of virtual DOM

Description

Seb is mostly inspired by simple-virtual-dom, basically a practice of my own.

Usage

var h = seb.h // `h` helps to build vdom tree
var render = seb.render // `render` helps to render VNode to HTML document
var diff = seb.diff // `diff` helps to find differences between two trees and return the patches
var patch = seb.patch // `patch` helps to update HTML document with the patches returned by `diff`

var tree0 = h('ul', {}, [
  h('li', { key: 0 }),
  h('li', { key: 1 })
])
var tree1 = h('ul', {}, [
  h('li', { key: 1 }),
  h('li', { key: 2 }),
  h('li', { key: 0 })
])

var dom = render(tree0)
var patches = diff(tree0, tree1)
patch(dom, patches)

Keywords

FAQs

Package last updated on 26 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc