New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hyperx-snabbdom

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperx-snabbdom

Converts hyperx to snabbdom virtual DOM

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

This module is a fork of hyperx-to-snabbdom extended with a fix for whitespace inconsistency.

The module itself converts hyperx virtual dom build to a snabbdom-compatible output.

Usage:

npm i --save hyperx hyperx-snabbdom snabbdom

// patch.js

var snabbdom = require('snabbdom')
module.exports = snabbdom.init([ // Init patch function with chosen modules
  require('snabbdom/modules/class').default, // makes it easy to toggle classes
  require('snabbdom/modules/props').default, // for setting properties on DOM elements
  require('snabbdom/modules/style').default, // handles styling on elements with support for animations
  require('snabbdom/modules/eventlisteners').default // attaches event listeners
])

// html.js 

module.exports = require('hyperx')(
  require('hyperx-to-snabbdom')(require('snabbdom/h').default)
)

// my-module.js

var patch = require('./patch')
var html = require('./html')

function homeView () {
  return html`
    <body>
      <h1>Home view</h1>
    </body>
  `
}

patch(document.body, homeView())

Keywords

snabbdom

FAQs

Package last updated on 03 Oct 2017

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