1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

replace electron store with lowdb

This commit is contained in:
Kyle Spearrin
2018-05-31 09:07:56 -04:00
parent 98e2e611f8
commit f618c0b5ee
7 changed files with 121 additions and 42 deletions

View File

@@ -13,9 +13,9 @@ export class Utils {
}
Utils.inited = true;
Utils.isNode = typeof window === 'undefined';
Utils.isBrowser = !Utils.isNode;
Utils.global = Utils.isNode ? global : window;
Utils.isNode = typeof process !== 'undefined' && (process as any).release.name === 'node';
Utils.isBrowser = typeof window !== 'undefined';
Utils.global = Utils.isNode && !Utils.isBrowser ? global : window;
}
static fromB64ToArray(str: string): Uint8Array {