UNPKG

marga

Version:
25 lines (24 loc) 797 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BancoPairBadge_1 = require("../../badge/BancoPairBadge"); const PuntoPairBadge_1 = require("../../badge/PuntoPairBadge"); const Entity_1 = require("../../entity/Entity"); class BeadEntity extends Entity_1.default { hasAnyPair() { return this.hasBancoPair() || this.hasPuntoPair(); } hasBothPair() { return this.hasBancoPair() && this.hasPuntoPair(); } hasBancoPair() { return this.getTagArray().some((tag) => { return tag instanceof BancoPairBadge_1.default; }); } hasPuntoPair() { return this.getTagArray().some((tag) => { return tag instanceof PuntoPairBadge_1.default; }); } } exports.default = BeadEntity;