This commit is contained in:
18
node_modules/hast-util-to-html/lib/all.js
generated
vendored
Normal file
18
node_modules/hast-util-to-html/lib/all.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict'
|
||||
|
||||
var one = require('./one')
|
||||
|
||||
module.exports = all
|
||||
|
||||
// Serialize all children of `parent`.
|
||||
function all(ctx, parent) {
|
||||
var results = []
|
||||
var children = (parent && parent.children) || []
|
||||
var index = -1
|
||||
|
||||
while (++index < children.length) {
|
||||
results[index] = one(ctx, children[index], index, parent)
|
||||
}
|
||||
|
||||
return results.join('')
|
||||
}
|
||||
Reference in New Issue
Block a user