aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/assert.ts')
-rw-r--r--src/utils/assert.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index eb084129c..0b7a11939 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -17,6 +17,9 @@ export const assert = {
isString(variableName: string, value: string): void {
this.assert(_.isString(value), this.typeAssertionMessage(variableName, 'string', value));
},
+ isFunction(variableName: string, value: any): void {
+ this.assert(_.isFunction(value), this.typeAssertionMessage(variableName, 'function', value));
+ },
isHexString(variableName: string, value: string): void {
this.assert(_.isString(value) && HEX_REGEX.test(value),
this.typeAssertionMessage(variableName, 'HexString', value));