diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
commit | fa4621e70c48500a372504eb8ae9b9481531c555 (patch) | |
tree | 50c457c8c2133dfec32cb465e1b3902ce88fb209 /src/util/helpers.ts | |
parent | 1b9c5855a8afb6833ff7a706f5bed5650e1191ad (diff) | |
download | wallet-core-fa4621e70c48500a372504eb8ae9b9481531c555.tar.xz |
history events WIP
Diffstat (limited to 'src/util/helpers.ts')
-rw-r--r-- | src/util/helpers.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/helpers.ts b/src/util/helpers.ts index 99d046f04..8136f44fa 100644 --- a/src/util/helpers.ts +++ b/src/util/helpers.ts @@ -214,3 +214,13 @@ export function strcmp(s1: string, s2: string): number { } return 0; } + +/** + * Run a function and return its result. + * + * Used as a nicer-looking way to do immediately invoked function + * expressions (IFFEs). + */ +export function runBlock<T>(f: () => T) { + return f(); +}
\ No newline at end of file |