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

9 lines
187 B
JavaScript

'use strict'
module.exports = place
/* Get the position of `node` in `parent`. */
function place(parent, child) {
return parent && parent.children && parent.children.indexOf(child)
}