@@ -9,27 +9,27 @@ const Wiki = sites => {
9 const authors = new Set()
9 const authors = new Set()
10 const terms = new Set()
10 const terms = new Set()
12− const storeEntry = (author, url, parent, cat, entry) => {
12+ const storeEntry = (author, url, category, term, entry) => {
13− if (!(parent in entries)) {
13+ if (!(category in entries)) {
14− entries[parent] = {}
14+ entries[category] = {}
15− entries[parent][cat] = [{ entry, author, url }]
15+ entries[category][term] = [{ entry, author, url }]
16− } else if (!(cat in entries[parent])) {
16+ } else if (!(term in entries[category])) {
17− entries[parent][cat] = [{ entry, author, url }]
17+ entries[category][term] = [{ entry, author, url }]
19− entries[parent][cat].push({ entry, author, url })
19+ entries[category][term].push({ entry, author, url })
21− terms.add(cat)
21+ terms.add(term)
22 authors.add(author)
22 authors.add(author)
25− const storeEntries = (author, url, parent, entries) => {
25+ const storeEntries = (author, url, category, entries) => {
26 Array.isArray(entries)
26 Array.isArray(entries)
27− ? storeEntry(author, url, parent, 'list-definitions', entries)
27+ ? storeEntry(author, url, category, 'list-definitions', entries)
28− : Object.keys(entries).forEach(entry => storeEntry(author, url, parent, entry, entries[entry]))
28+ : Object.keys(entries).forEach(entry => storeEntry(author, url, category, entry, entries[entry]))
31 const transform = (author, url, ndtl) => {
31 const transform = (author, url, ndtl) => {
32− Object.keys(ndtl).forEach(cat => storeEntries(author, url, cat, ndtl[cat]))
32+ Object.keys(ndtl).forEach(category => storeEntries(author, url, category, ndtl[category]))
35 const parse = (site, content) => {
35 const parse = (site, content) => {