aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-10-06 20:24:42 +0800
committerGitHub <noreply@github.com>2017-10-06 20:24:42 +0800
commitf38d2f80a6e3af4ff7e2454d42abdf2a389e4303 (patch)
tree9e2f94e7d8236f7612628288d7eab3333d240b6b /src/utils/assert.ts
parentcd5327bc31618b4ea268de1902a74cf862987ee6 (diff)
parent0c112a2a1c1811e1fc7c4b03881f960b952c788c (diff)
downloaddexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar.gz
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar.bz2
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar.lz
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar.xz
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.tar.zst
dexon-sol-tools-f38d2f80a6e3af4ff7e2454d42abdf2a389e4303.zip
Merge pull request #182 from 0xProject/feature/ethereumjs-blockstream
Rewrite subscriptions
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));