git ssb

0+

dangerousbeans / yap



forked from Dominic / yap

Tree: 8c686fb2b73c28246604759c61d6636e2812d871

Files: 8c686fb2b73c28246604759c61d6636e2812d871 / test / to-html.js

522 bytesRaw
1
2var pull = require('pull-stream')
3var u = require('../util')
4
5var h = u.h
6var toHTML = u.toHTML
7
8var hs = h('h1', function (cb) {
9 if(cb == null) throw new Error('cb should not be null')
10 console.log('CB?', cb)
11 setTimeout(function () {
12 cb(null, 'hello world')
13 })
14},
15 h('ol',
16 pull.values([
17 h('li', 'one'),
18 h('li', 'two'),
19 h('li', 'three'),
20 ])
21 )
22)
23
24console.error(hs)
25
26toHTML(function (cb) { cb(null, hs) })(function (err, el) {
27 if(err) throw err
28 console.log(el, el.outerHTML)
29})
30
31

Built with git-ssb-web