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/validateKeyPath.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/idb-bridge/src/util/validateKeyPath.ts') diff --git a/packages/idb-bridge/src/util/validateKeyPath.ts b/packages/idb-bridge/src/util/validateKeyPath.ts index 2beb3c468..3bbe653b6 100644 --- a/packages/idb-bridge/src/util/validateKeyPath.ts +++ b/packages/idb-bridge/src/util/validateKeyPath.ts @@ -17,7 +17,10 @@ import { IDBKeyPath } from "../idbtypes"; // http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-valid-key-path -const validateKeyPath = (keyPath: IDBKeyPath | IDBKeyPath[], parent?: "array" | "string") => { +export const validateKeyPath = ( + keyPath: IDBKeyPath | IDBKeyPath[], + parent?: "array" | "string", +) => { // This doesn't make sense to me based on the spec, but it is needed to pass the W3C KeyPath tests (see same // comment in extractKey) let myKeyPath: IDBKeyPath | IDBKeyPath[] = keyPath; @@ -74,5 +77,3 @@ const validateKeyPath = (keyPath: IDBKeyPath | IDBKeyPath[], parent?: "array" | throw new SyntaxError(); }; - -export default validateKeyPath; -- cgit v1.2.3