Files
30-seconds-of-code/node_modules/hast-util-to-html/lib/all.js
2019-08-20 15:52:05 +02:00

20 lines
381 B
JavaScript

'use strict'
var one = require('./one')
module.exports = all
/* Stringify all children of `parent`. */
function all(ctx, parent) {
var children = parent && parent.children
var length = children && children.length
var index = -1
var results = []
while (++index < length) {
results[index] = one(ctx, children[index], index, parent)
}
return results.join('')
}