@mhsalves/yugioh-fb-catalog
Version:
This catalog tools helps to retrieve data from Yugioh Forbidden Memories
16 lines (15 loc) • 898 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCardsByMonsterType = exports.getCardsByType = exports.getCard = exports.getCardList = void 0;
const cards_1 = __importDefault(require("../data/cards"));
const getCardList = () => cards_1.default;
exports.getCardList = getCardList;
const getCard = (id) => cards_1.default.find((card) => card.id === id);
exports.getCard = getCard;
const getCardsByType = (cardType) => cards_1.default.filter((card) => card.cardType === cardType);
exports.getCardsByType = getCardsByType;
const getCardsByMonsterType = (monsterType) => cards_1.default.filter((card) => card.cardType === 'Monster' && card.monsterType === monsterType);
exports.getCardsByMonsterType = getCardsByMonsterType;