UNPKG

uhtml

Version:

A minimalistic library to create fast and reactive Web pages

9 lines (6 loc) 251 B
import DEBUG from '../debug.js'; const tree = DEBUG ? ((node, i) => i < 0 ? node?.content : node?.childNodes?.[i]) : ((node, i) => i < 0 ? node.content : node.childNodes[i]) ; export default (root, path) => path.reduceRight(tree, root);