Index

Accessors

Methods

  • Is the card legalities entry legal for the game format?

    Parameters

    • legality: string

      Game format entry in legalities.

    Returns boolean

    Is the card legal.

  • 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.

  • Scryfall / ISO language code to name.

    Parameters

    • code: string

      ISO language code.

    Returns string

    Full language name.

  • Normalizes card finish.

    Parameters

    • finish: string

      Finish to normalize.

    Returns CardFinish

    Normalized finish property.

  • Normalizes supported ISO lang codes.

    Parameters

    • code: string

      Language code to normalize.

    Returns string

    Normalized lang code.

  • 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_cost Scryfall data.

    Returns Set<string>

    A set of unique WUBRG colors contained in the mana cost.

  • Parses a string price value ensuring a finite number or null. The price property of cards is a string or null.

    Parameters

    • value: string

      Value to parse.

    Returns number

    Parsed price as number or null.