diff options
author | Florian Dold <florian@dold.me> | 2021-02-16 11:34:50 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-02-16 13:47:01 +0100 |
commit | db59275b6b43f8fa7f36899ae81cb7139a2e80cb (patch) | |
tree | 66ef429005a0ab239a212c39ad4501b29f727f97 /packages/idb-bridge/src/util/cmp.ts | |
parent | d1f00aeaa26af6835ea3f47ac280b1e67d672fa2 (diff) | |
download | wallet-core-db59275b6b43f8fa7f36899ae81cb7139a2e80cb.tar.gz wallet-core-db59275b6b43f8fa7f36899ae81cb7139a2e80cb.tar.bz2 wallet-core-db59275b6b43f8fa7f36899ae81cb7139a2e80cb.zip |
add more tests and fix various issues
Diffstat (limited to 'packages/idb-bridge/src/util/cmp.ts')
-rw-r--r-- | packages/idb-bridge/src/util/cmp.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/idb-bridge/src/util/cmp.ts b/packages/idb-bridge/src/util/cmp.ts index ddd43f2a6..e7f26bf1a 100644 --- a/packages/idb-bridge/src/util/cmp.ts +++ b/packages/idb-bridge/src/util/cmp.ts @@ -15,7 +15,7 @@ */ import { DataError } from "./errors"; -import valueToKey from "./valueToKey"; +import { valueToKey } from "./valueToKey"; const getType = (x: any) => { if (typeof x === "number") { @@ -38,7 +38,7 @@ const getType = (x: any) => { }; // https://w3c.github.io/IndexedDB/#compare-two-keys -const compareKeys = (first: any, second: any): -1 | 0 | 1 => { +export const compareKeys = (first: any, second: any): -1 | 0 | 1 => { if (second === undefined) { throw new TypeError(); } @@ -104,5 +104,3 @@ const compareKeys = (first: any, second: any): -1 | 0 | 1 => { return first > second ? 1 : -1; }; - -export default compareKeys; |