Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

luobo-node

0.1.0 • Public • Published

node

用函数调用的方式来构建 HTML 片段。

示例

node()

node('div', {'class': 'message'}, node('p', 'hello'));
// returns
// '<div class="message"><p>hello</p></div>'

node.each()

node('ul', node.each(['luobo', 'tang', 'mickey'], function (p) { return node('li', p) }))
// returns
// '<ul><li>luobo</li><li>tang</li><li>mickey</li></ul>'

Keywords

none

install

npm i luobo-node

Downloadsweekly downloads

5

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability