1 | /* Dependencies. */
|
2 | const one = require('./one')
|
3 |
|
4 | /* Expose. */
|
5 | module.exports = all
|
6 |
|
7 | /* Stringify all children of `parent`. */
|
8 | function 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 | }
|