1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-06-13 00:09:18 +00:00

feat: Add support for Asians Pokémon Cards (#481)

This commit is contained in:
2024-06-07 12:53:08 +02:00
committed by GitHub
parent a35fadd50c
commit a26ef0e5eb
8069 changed files with 379200 additions and 423 deletions

View File

@ -1,4 +1,4 @@
import { ArrayExpression, Identifier, JSCodeshift, Literal, ObjectExpression, Property, Transform } from "jscodeshift";
import { ArrayExpression, Identifier, JSCodeshift, Literal, ObjectExpression, Property, Transform } from "jscodeshift"
interface ObjectField {
type: 'Object'
@ -86,6 +86,11 @@ function set(j: JSCodeshift, path: ObjectExpression | ArrayExpression, value: Po
}
})
if (exists) {return}
if (key.toString().includes('-')) {
key = `'${key.toString()}'`
}
path.properties.push(j.property('init', j.identifier(key + ''), value))
} else {