mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-06-17 18:09:19 +00:00
feat: Add an updated field to the card field (#460)
This commit is contained in:
@ -56,6 +56,20 @@ function simplify(base: ObjectExpression): ObjectField {
|
||||
}
|
||||
}
|
||||
|
||||
function exists(path: ObjectExpression | ArrayExpression, key: string | number) {
|
||||
if (path.type === 'ObjectExpression') {
|
||||
path.properties.forEach((p) => {
|
||||
const prop = p as Property
|
||||
if ((prop.key as Identifier).name === (key + '')) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function set(j: JSCodeshift, path: ObjectExpression | ArrayExpression, value: Possible, key: string | number, options?: {override?: boolean}) {
|
||||
|
||||
let exists = false
|
||||
|
4
meta/definitions/api.d.ts
vendored
4
meta/definitions/api.d.ts
vendored
@ -261,7 +261,9 @@ export interface Card extends CardResume {
|
||||
* Ability to play in expanded tournaments
|
||||
*/
|
||||
expanded: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
updated: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user