Class ScryfallDataAbstract
Accessors
StaticsupportedFormats
Returns ReadonlySet<string>
Methods
StaticisLegal
Parameters
- legality: string
Game format entry in
legalities.
Returns boolean
Is the card legal.
- legality: string
StaticisSupportedFormat
Provides a type guard for testing game format support.
Parameters
- format: string
Game format to test.
Returns format is GameFormat
Whether the give format is supported.
- format: string
StaticlangCodeToName
Scryfall / ISO language code to name.
Parameters
- code: string
ISO language code.
Returns string
Full language name.
- code: string
StaticnormalizeFinish
Normalizes card finish.
Parameters
- finish: string
Finish to normalize.
Returns CardFinish
Normalized finish property.
- finish: string
StaticnormalizeLangCode
Normalizes supported ISO lang codes.
Parameters
- code: string
Language code to normalize.
Returns string
Normalized lang code.
- code: string
StaticparseCollectorNumber
Best-effort parser for Scryfall collector numbers.
Collector numbers are identifiers, not ordinals. This function extracts optional numeric tokens for sorting and grouping heuristics only.
No guarantees are made about release order or canonical meaning.
For sorting by collector number see @typhonjs-tcg/scrydex/data/sort/util!SortCards.byCollectorNumber.
Parameters
- value: string
Returns ParsedCollectorNumber
StaticparseManaCostColors
Parses a Scryfall mana_cost string such as
{2}{W}{U/B}{G/P}and returns a set of MTG color letters actually required to CAST the spell.Parameters
- manaCost: string
mana_costScryfall data.
Returns Set<string>
A set of unique WUBRG colors contained in the mana cost.
- manaCost: string
StaticparsePrice
Parses a string price value ensuring a finite number or null. The
priceproperty of cards is a string or null.Parameters
- value: string
Value to parse.
Returns number
Parsed price as number or null.
- value: string
Is the card
legalitiesentry legal for the game format?