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:
@ -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 {
|
||||
|
||||
|
Reference in New Issue
Block a user