SupportBot 7.3

This commit is contained in:
ItzEmerald committed 2021-10-04 13:54:30 +01:00
1 parent 19a12f6c8f
commit 09f0873f27
4762 files changed
+504608 -52

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BooleanPredicate = void 0;
const predicate_1 = require("./predicate");
class BooleanPredicate extends predicate_1.Predicate {
/**
@hidden
*/
constructor(options) {
super('boolean', options);
}
/**
Test a boolean to be true.
*/
get true() {
return this.addValidator({
message: (value, label) => `Expected ${label} to be true, got ${value}`,
validator: value => value
});
}
/**
Test a boolean to be false.
*/
get false() {
return this.addValidator({
message: (value, label) => `Expected ${label} to be false, got ${value}`,
validator: value => !value
});
}
}
exports.BooleanPredicate = BooleanPredicate;