feat: Add DB

This commit is contained in:
Marcel Cruz
2022-11-18 18:51:59 +01:00
parent ff0ca69170
commit 745a209957
13 changed files with 13729 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
module.exports = function (tables) {
return tables
.map(({ name: categoryName, rows }) => {
return rows.map(({ link, name: entryName, description: rawDescription }) => {
const [description, auth, https, cors] = rawDescription
.split('|')
.map(item => item.trim())
.filter(item => item)
return {
API: entryName,
Description: description,
Auth: auth?.toLowerCase() === 'no' ? '' : auth,
HTTPS: https?.toLowerCase() === 'yes' ? true : false,
Cors: cors?.toLowerCase(),
Link: link,
Category: categoryName,
}
})
})
.flat()
}