From db59275b6b43f8fa7f36899ae81cb7139a2e80cb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 16 Feb 2021 11:34:50 +0100 Subject: add more tests and fix various issues --- packages/idb-bridge/src/util/cmp.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'packages/idb-bridge/src/util/cmp.ts') 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; -- cgit v1.2.3