0.0.1 • Published 8 years ago
hipsterscript v0.0.1
Hipsterscript
The most hipster DSL for creating virtual trees.
Example
var h = require("hipsterscript");
var tree = h("div.header", {style: {"background-color": "yellow"}}, [
h(".header_container", [
h(".header_container_logo"),
h(".header_container_login-container")
])
]);
console.log(tree.outerHTML);
API
h(selector, properties, children)
Name | Type | Description |
---|---|---|
selector | String | DOM Selector |
properties | Object | (Optional) - Attributes to set on the node |
children | Array<hNode> | (Optional) - Children nodes. |
Returns: hNode
0.0.1
8 years ago