@iotize/cli
Version:
IoTize command line interface
15 lines • 527 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const clime_1 = require("clime");
class InListValidator {
constructor(values) {
this.values = values;
}
validate(value, context) {
if (this.values.indexOf(value) === -1) {
throw new clime_1.ExpectedError(`"${value}" is not valid. It should be one of the following value: ${this.values.join(', ')}`);
}
}
}
exports.InListValidator = InListValidator;
//# sourceMappingURL=in-list.js.map