mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
11 lines
356 B
TypeScript
11 lines
356 B
TypeScript
import Rarity, { RaritySimple } from "@tcgdex/sdk/interfaces/Rarity";
|
|
import { Langs } from "@tcgdex/sdk/interfaces/LangList";
|
|
import TranslationUtil from "@tcgdex/sdk/TranslationUtil";
|
|
|
|
export function rarityToRaritySimple(rarity: Rarity, lang: Langs): RaritySimple {
|
|
return {
|
|
id: rarity,
|
|
name: TranslationUtil.translate("rarity", rarity, lang)
|
|
}
|
|
}
|