UNPKG

410 BJavaScriptView Raw
1/* Dependencies. */
2const one = require('./one')
3
4/* Expose. */
5module.exports = all
6
7/* Stringify all children of `parent`. */
8function all (ctx, parent) {
9 const children = parent && parent.children
10 const length = children && children.length
11 let index = -1
12 const results = []
13
14 while (++index < length) {
15 results[index] = one(ctx, children[index], index, parent)
16 }
17
18 return results.join('')
19}