UNPKG

corde

Version:

A simple library for Discord bot tests

29 lines (22 loc) 442 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true, }); exports.Validator = void 0; class Validator { constructor() { this._validators = []; } add(fn) { this._validators.push(fn); } isValid(...params) { for (let i = 0; i < this._validators.length; i++) { if (!this._validators[i](...params)) { return false; } } return true; } } exports.Validator = Validator;