diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-26 20:35:06 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-26 20:35:06 +0530 |
commit | 3d0fbea4671f5a4a35f29445fbf10e3138f49229 (patch) | |
tree | 14dcaa68f62b049583b14e0b9822d67fa479e43b /src/webex/compat.ts | |
parent | ccdc7cffed3ba784c8fd65e0779cd0807a53d39f (diff) | |
download | wallet-core-3d0fbea4671f5a4a35f29445fbf10e3138f49229.tar.xz |
log to stderr when running on node
Diffstat (limited to 'src/webex/compat.ts')
-rw-r--r-- | src/webex/compat.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/webex/compat.ts b/src/webex/compat.ts index 65ddfab4a..121c58e7f 100644 --- a/src/webex/compat.ts +++ b/src/webex/compat.ts @@ -26,3 +26,10 @@ export function isFirefox(): boolean { } return false; } + +/** + * Check if we are running under nodejs. + */ +export function isNode() { + return (typeof process !== 'undefined') && (process.release.name === 'node') +}
\ No newline at end of file |