aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-03 01:45:57 +0800
committerFabio Berger <me@fabioberger.com>2017-06-03 01:45:57 +0800
commit1443c0838cbd795ae8e6273b1d7659c8e449f2eb (patch)
tree531df9d489dd4c5ce15623bee0beeae3ad58ccd4 /src/utils/assert.ts
parent3de655954743db4e2b9d02f5ac1243855b909236 (diff)
parentd4320fec724c5bf34e7dcd006cba8ffe7a3c76d1 (diff)
downloaddexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar.gz
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar.bz2
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar.lz
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar.xz
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.tar.zst
dexon-sol-tools-1443c0838cbd795ae8e6273b1d7659c8e449f2eb.zip
Merge branch 'master' into remainingTokenMethods
# Conflicts: # src/types.ts # src/web3_wrapper.ts
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 9a6a132e0..7dffcd98e 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -33,6 +33,9 @@ export const assert = {
isNumber(variableName: string, value: number): void {
this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value));
},
+ isBoolean(variableName: string, value: boolean): void {
+ this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value));
+ },
doesConformToSchema(variableName: string, value: object, schema: Schema): void {
const schemaValidator = new SchemaValidator();
const validationResult = schemaValidator.validate(value, schema);