snabber

0.0.7 • Public • Published

⚓ snabbdom helpers

it's a basic module that wraps the snabbdom tags, it's based on the cycle.js DOM hyperscript helpers, the reason I made this little module is a server side project and the snabbdom-helpers module (currently) doesn't seem to work correctly with the snabbdom-to-html module

instead of

h('div', { style: { color: 'red' } }, 'The quick brown fox jumps')

you can do this

div({ style: { color: 'red' } }, 'The quick brown fox jumps')

installation

npm install snabber

ussage

import { div } from 'snabber'
import toHTML from 'snabbdom-to-html'
 
const node = div('.box', 'Hello world!')
toHTML(node)  // ->  <div class="box">Hello world!</div>

Readme

Keywords

Package Sidebar

Install

npm i snabber

Weekly Downloads

1

Version

0.0.7

License

MIT

Last publish

Collaborators

  • klaaz0r