CardTypeUtils

Utility functions for card type checking.

Usage:

import { CardTypeUtils } from '@devmugi/scryfall-api';

if (CardTypeUtils.isCreature(card)) {
console.log('Power:', card.power);
}

Functions

Link copied to clipboard
fun isArtifact(card: Card): Boolean

Returns true if the card is an artifact

Link copied to clipboard
fun isBattle(card: Card): Boolean

Returns true if the card is a battle

Link copied to clipboard
fun isCreature(card: Card): Boolean

Returns true if the card is a creature

Link copied to clipboard
fun isEnchantment(card: Card): Boolean

Returns true if the card is an enchantment

Link copied to clipboard
fun isInstant(card: Card): Boolean

Returns true if the card is an instant

Link copied to clipboard
fun isLand(card: Card): Boolean

Returns true if the card is a land

Link copied to clipboard
fun isPlaneswalker(card: Card): Boolean

Returns true if the card is a planeswalker

Link copied to clipboard
fun isSorcery(card: Card): Boolean

Returns true if the card is a sorcery