mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-22 10:52:10 +00:00
perf: Remove Uneeded logging (#219)
This commit is contained in:
parent
16467d4a19
commit
1d8077d8b4
@ -80,10 +80,8 @@ export default class Card implements LocalCard {
|
||||
const res = (require(`../../../generated/${lang}/cards.json`) as Array<SDKCard>).find((c) => {
|
||||
return objectLoop(params, (it, key) => {
|
||||
if (key === 'set' && typeof it === 'string') {
|
||||
console.log("set", c['set'].id, it, lightCheck(c['set'].id, it))
|
||||
return (c['set'].id === it || lightCheck(c['set'].name, it))
|
||||
}
|
||||
console.log("other field", key, c[key as 'localId'], it, lightCheck(c[key as 'localId'], it))
|
||||
return lightCheck(c[key as 'localId'], it)
|
||||
})
|
||||
})
|
||||
|
@ -44,17 +44,16 @@ export function betterSorter(a: string, b: string) {
|
||||
return a >= b ? 1 : -1
|
||||
}
|
||||
|
||||
export function tree(path: string, padding = 0) {
|
||||
const folder = fs.readdirSync(path)
|
||||
for (const file of folder) {
|
||||
const filePath = path + '/' + file
|
||||
console.log(filePath.padStart(padding, '-'))
|
||||
try {
|
||||
fs.lstatSync(filePath).isDirectory()
|
||||
tree(filePath)
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
// export function tree(path: string, padding = 0) {
|
||||
// const folder = fs.readdirSync(path)
|
||||
// for (const file of folder) {
|
||||
// const filePath = path + '/' + file
|
||||
// try {
|
||||
// fs.lstatSync(filePath).isDirectory()
|
||||
// tree(filePath)
|
||||
// } catch {}
|
||||
// }
|
||||
// }
|
||||
|
||||
export function lightCheck(source: any, item: any): boolean {
|
||||
if (typeof source === 'undefined') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user