From b2d0ad57ddf251a109d536cdc49fb6505dbdc50c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 11 Jul 2023 15:41:48 +0200 Subject: sqlite3 backend for idb-bridge / wallet-core --- packages/idb-bridge/src/util/extractKey.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/idb-bridge/src/util/extractKey.ts') diff --git a/packages/idb-bridge/src/util/extractKey.ts b/packages/idb-bridge/src/util/extractKey.ts index 6a3d468ef..2a4ec45b9 100644 --- a/packages/idb-bridge/src/util/extractKey.ts +++ b/packages/idb-bridge/src/util/extractKey.ts @@ -19,7 +19,11 @@ import { IDBKeyPath, IDBValidKey } from "../idbtypes.js"; import { valueToKey } from "./valueToKey.js"; // http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#dfn-steps-for-extracting-a-key-from-a-value-using-a-key-path +/** + * Algorithm to "extract a key from a value using a key path". + */ export const extractKey = (keyPath: IDBKeyPath | IDBKeyPath[], value: any) => { + //console.log(`extracting key ${JSON.stringify(keyPath)} from ${JSON.stringify(value)}`); if (Array.isArray(keyPath)) { const result: IDBValidKey[] = []; -- cgit v1.2.3