site.ori/links: simplify
This commit is contained in:
parent
3c05b4cc72
commit
608cf49c1b
5
site.ori
5
site.ori
|
|
@ -10,9 +10,8 @@
|
|||
spread the final result of this closure into the parent tree.
|
||||
*/
|
||||
...{
|
||||
hast = Tree.map(pages, getLinkedFilesFromHtml.js)
|
||||
//the [...new Set()] construct filters out duplicates
|
||||
links: Tree.flat(hast, 2) → (a) => [...new Set(a)]
|
||||
links: Tree.map(pages, getLinkedFilesFromHtml.js)
|
||||
→ (links) => Tree.flat(links, 2) → (a) => [...new Set(a)]
|
||||
|
||||
//linksAsTree is a nested object representation of the paths.
|
||||
//can use that object as a mask on all to get a 'filtered' tree.
|
||||
|
|
|
|||
Loading…
Reference in New Issue