hypergluten

0.0.2 • Public • Published

hypergluten

HTML data binding on top of hyperglue

Instead of binding data to css selectors data is bound to [data-bind={key}] for you.

Installation

npm install hypergluten

Basic Use

var g = require('hypergluten');
var html = '<h1 data-bind="title"></h1>';
 
g(html, { title: 'Hello World!' });
<h1 data-bind="title">Hello World!</h1>

The rendering is all delegated to hyperglue so providing objects works as you'd expect.

var g = require('hypergluten');
var html = '<img data-bind="thumb">';
 
g(html, { 
    thumb: {
        src: '/pizza.png'
    }
});
<img data-bind="thumb" src="/pizza.png">

Testing

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i hypergluten

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • drk