UNPKG

indexifier

Version:

Generate an index from a directory

7 lines (5 loc) 197 B
const path = require('path'); module.exports = function wrapHref(node, cwd) { const relativePath = path.relative(cwd, node.path); return `<a href="./${relativePath}">${node.name}</a>`; };