mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-12-22 13:07:00 +00:00
9 lines
310 B
JavaScript
9 lines
310 B
JavaScript
|
const fs = require("fs").promises
|
||
|
|
||
|
const names = ["subscriptions", "settings"]
|
||
|
const icons = names.map(name => fs.readFile(`html/static/images/${name}.svg`, "utf8"))
|
||
|
|
||
|
module.exports.icons = Promise.all(icons).then(resolvedIcons => {
|
||
|
return new Map(names.map((name, index) => [name, resolvedIcons[index]]))
|
||
|
})
|