summaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src/util/validateKeyPath.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/idb-bridge/src/util/validateKeyPath.ts')
-rw-r--r--packages/idb-bridge/src/util/validateKeyPath.ts7
1 files changed, 4 insertions, 3 deletions
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;