summaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src/util/cmp.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-02-16 11:34:50 +0100
committerFlorian Dold <florian@dold.me>2021-02-16 13:47:01 +0100
commitdb59275b6b43f8fa7f36899ae81cb7139a2e80cb (patch)
tree66ef429005a0ab239a212c39ad4501b29f727f97 /packages/idb-bridge/src/util/cmp.ts
parentd1f00aeaa26af6835ea3f47ac280b1e67d672fa2 (diff)
downloadwallet-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.ts6
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;