diff --git a/build/cjs/async-iterators.js b/build/cjs/async-iterators.js index c31e235..0505b9e 100644 --- a/build/cjs/async-iterators.js +++ b/build/cjs/async-iterators.js @@ -44,7 +44,7 @@ function isIteratorProp(target, prop) { wrapIdbValue.instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) || (prop === 'iterate' && wrapIdbValue.instanceOfAny(target, [IDBIndex, IDBObjectStore]))); } -wrapIdbValue.replaceTraps(oldTraps => ({ +wrapIdbValue.replaceTraps((oldTraps) => ({ ...oldTraps, get(target, prop, receiver) { if (isIteratorProp(target, prop)) diff --git a/build/cjs/async-iterators.js.map b/build/cjs/async-iterators.js.map index 841df68..1239c54 100644 --- a/build/cjs/async-iterators.js.map +++ b/build/cjs/async-iterators.js.map @@ -1 +1 @@ -{"version":3,"file":"async-iterators.js","sourceRoot":"","sources":["../../src/async-iterators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAQ,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/E,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,CAAC,CAAC;AACzE,MAAM,SAAS,GAA0B,EAAE,CAAC;AAC5C,MAAM,cAAc,GAAG,IAAI,OAAO,EAA0C,CAAC;AAC7E,MAAM,gCAAgC,GAAG,IAAI,OAAO,EAA0B,CAAC;AAE/E,MAAM,mBAAmB,GAAsB;IAC7C,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAc,CAAC;YAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;QAEtE,IAAI,UAAU,GAAG,SAAS,CAAC,IAAc,CAAC,CAAC;QAE3C,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,SAAS,CAAC,IAAc,CAAC,GAAG,UAEvC,GAAG,IAAS;gBAEZ,cAAc,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AI,aAAa,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAC1E,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1B,GAAG,QAAQ;IACX,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;QACxB,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;YAAE,OAAO,OAAO,CAAC;QACjD,OAAO,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;CACF,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/cjs/database-extras.js.map b/build/cjs/database-extras.js.map index 1e27017..98a3660 100644 --- a/build/cjs/database-extras.js.map +++ b/build/cjs/database-extras.js.map @@ -1 +1 @@ -{"version":3,"file":"database-extras.js","sourceRoot":"","sources":["../../src/database-extras.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AACvE,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAgB,CAAC;AAE9C,SAAS,SAAS,CAChB,MAAW,EACX,IAA8B;IAE9B,IACE,CAAC,CACC,MAAM,YAAY,WAAW;QAC7B,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC;QACjB,OAAO,IAAI,KAAK,QAAQ,CACzB,EACD;QACA,OAAO;KACR;I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I,CAAC;CAC3D,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/cjs/entry.js.map b/build/cjs/entry.js.map index 62a2239..b5cd5e0 100644 --- a/build/cjs/entry.js.map +++ b/build/cjs/entry.js.map @@ -1 +1 @@ -{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAmCxC;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CACpB,IAAY,EACZ,OAAe,EACf,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,KAA+B,EAAE;IAEzE,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAmC,CAAC;IAEpE,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,gBAAgB,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE;YAChD,OAAO,CACL,IAAI,CAAC,OAAO,CAAC,MAAM,CAA0B,EAC7C,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,UAAU,EACf,IAAI,CAAC,OAAO,CAAC,WAAY,CAAyC,CACpE,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;IAED,IAAI,OAAO;QAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAElE,WAAW;SACR,IAAI,CAAC,EAAE,CAAC,EAAE;QACT,IAAI,UAAU;YAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACjE,IAAI,QAAQ;YAAE,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,C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O,EAAE,CAAC,CAAC;IAElE,WAAW;SACR,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE;QACX,IAAI,UAAU;YAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACjE,IAAI,QAAQ;YAAE,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAEnB,OAAO,WAAW,CAAC;AACrB,CAAC;AASD;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CACtB,IAAY,EACZ,EAAE,OAAO,KAAwB,EAAE;IAEnC,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,OAAO;QAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC7C,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/build/cjs/index.js b/build/cjs/index.js index 6fe0292..26d328c 100644 --- a/build/cjs/index.js +++ b/build/cjs/index.js @@ -15,14 +15,14 @@ function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) const request = indexedDB.open(name, version); const openPromise = wrapIdbValue.wrap(request); if (upgrade) { - request.addEventListener('upgradeneeded', event => { + request.addEventListener('upgradeneeded', (event) => { upgrade(wrapIdbValue.wrap(request.result), event.oldVersion, event.newVersion, wrapIdbValue.wrap(request.transaction)); }); } if (blocked) request.addEventListener('blocked', () => blocked()); openPromise - .then(db => { + .then((db) => { if (terminated) db.addEventListener('close', () => terminated()); if (blocking) @@ -77,7 +77,7 @@ function getMethod(target, prop) { cachedMethods.set(prop, method); return method; } -wrapIdbValue.replaceTraps(oldTraps => ({ +wrapIdbValue.replaceTraps((oldTraps) => ({ ...oldTraps, get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver), has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop), diff --git a/build/cjs/util.d.ts.map b/build/cjs/util.d.ts.map index a84b6b7..215b80d 100644 --- a/build/cjs/util.d.ts.map +++ b/build/cjs/util.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,oBAAY,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE3C,eAAO,MAAM,aAAa,uDAG+B,CAAC"} \ No newline at end of file +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,oBAAY,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE3C,eAAO,MAAM,aAAa,uDAGiC,CAAC"} \ No newline at end of file diff --git a/build/cjs/util.js.map b/build/cjs/util.js.map index ffab84f..b10e373 100644 --- a/build/cjs/util.js.map +++ b/build/cjs/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAW,EACX,YAA2B,EAClB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAW,EACX,YAA2B,EAClB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/cjs/wrap-idb-value.js b/build/cjs/wrap-idb-value.js index 8361ee8..b70cde5 100644 --- a/build/cjs/wrap-idb-value.js +++ b/build/cjs/wrap-idb-value.js @@ -1,6 +1,6 @@ 'use strict'; -const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c); +const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c); let idbProxyableTypes; let cursorAdvanceMethods; @@ -47,7 +47,7 @@ function promisifyRequest(request) { request.addEventListener('error', error); }); promise - .then(value => { + .then((value) => { // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval // (see wrapFunction). if (value instanceof IDBCursor) { diff --git a/build/cjs/wrap-idb-value.js.map b/build/cjs/wrap-idb-value.js.map index 2d4ba85..94b4a1d 100644 --- a/build/cjs/wrap-idb-value.js.map +++ b/build/cjs/wrap-idb-value.js.map @@ -1 +1 @@ -{"version":3,"file":"wrap-idb-value.js","sourceRoot":"","sources":["../../src/wrap-idb-value.ts"],"names":[],"mappings":"AAQA,OAAO,EAAqB,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE1D,IAAI,iBAAgC,CAAC;AACrC,IAAI,oBAA4B,CAAC;AAEjC,qEAAqE;AACrE,SAAS,oBAAoB;IAC3B,OAAO,CACL,iBAAiB;QACjB,CAAC,iBAAiB,GAAG;YACnB,WAAW;YACX,cAAc;YACd,QAAQ;YACR,SAAS;YACT,cAAc;SACf,CAAC,CACH,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,SAAS,uBAAuB;IAC9B,OAAO,CACL,oBAAoB;QACpB,CAAC,oBAAoB,GAAG;YACtB,SAAS,CAAC,SAAS,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,CAAC;IAC9C,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAU;IACxC,IAAI,OAAO,KAAK,KAAK,UAAU;QAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAE5D,6EAA6E;IAC7E,uEAAuE;IACvE,IAAI,KAAK,YAAY,cAAc;QAAE,8BAA8B,CAAC,KAAK,CAAC,CAAC;IAE3E,IAAI,aAAa,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC;QAC9C,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAEzC,iEAAiE;IACjE,OAAO,KAAK,CAAC;AACf,CAAC;AAeD,MAAM,UAAU,IAAI,CAAC,KAAU;IAC7B,gGAAgG;IAChG,2FAA2F;IAC3F,IAAI,KAAK,YAAY,UAAU;QAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEhE,+EAA+E;IAC/E,wDAAwD;IACxD,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAE/C,iCAAiC;IACjC,+DAA+D;IAC/D,IAAI,QAAQ,KAAK,KAAK,EAAE;QACtB,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACpC,qBAAqB,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC5C;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAoBD,MAAM,CAAC,MAAM,MAAM,GAAW,CAAC,KAAU,EAAO,EAAE,CAChD,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/build/esm/async-iterators.js b/build/esm/async-iterators.js index 83f5a64..1cfdda5 100644 --- a/build/esm/async-iterators.js +++ b/build/esm/async-iterators.js @@ -42,7 +42,7 @@ function isIteratorProp(target, prop) { instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) || (prop === 'iterate' && instanceOfAny(target, [IDBIndex, IDBObjectStore]))); } -replaceTraps(oldTraps => ({ +replaceTraps((oldTraps) => ({ ...oldTraps, get(target, prop, receiver) { if (isIteratorProp(target, prop)) diff --git a/build/esm/async-iterators.js.map b/build/esm/async-iterators.js.map index 841df68..1239c54 100644 --- a/build/esm/async-iterators.js.map +++ b/build/esm/async-iterators.js.map @@ -1 +1 @@ -{"version":3,"file":"async-iterators.js","sourceRoot":"","sources":["../../src/async-iterators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAQ,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/E,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,CAAC,CAAC;AACzE,MAAM,SAAS,GAA0B,EAAE,CAAC;AAC5C,MAAM,cAAc,GAAG,IAAI,OAAO,EAA0C,CAAC;AAC7E,MAAM,gCAAgC,GAAG,IAAI,OAAO,EAA0B,CAAC;AAE/E,MAAM,mBAAmB,GAAsB;IAC7C,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAc,CAAC;YAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;QAEtE,IAAI,UAAU,GAAG,SAAS,CAAC,IAAc,CAAC,CAAC;QAE3C,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,SAAS,CAAC,IAAc,CAAC,GAAG,UAEvC,GAAG,IAAS;gBAEZ,cAAc,CAAC,GAAG,CAChB,IAAI,EACH,gCAAgC,CAAC,GAAG,CAAC,IAAI,CAAS,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CACnE,CAAC;YACJ,CAAC,CAAC;SACH;QAED,OAAO,UAAU,CAAC;IAC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;IACX,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;QACxB,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;YAAE,OAAO,OAAO,CAAC;QACjD,OAAO,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,GAAG,CAAC,MAAM,EAAE,IAAI;QACd,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;CACF,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/esm/database-extras.js.map b/build/esm/database-extras.js.map index 1e27017..98a3660 100644 --- a/build/esm/database-extras.js.map +++ b/build/esm/database-extras.js.map @@ -1 +1 @@ -{"version":3,"file":"database-extras.js","sourceRoot":"","sources":["../../src/database-extras.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AACvE,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAgB,CAAC;AAE9C,SAAS,SAAS,CAChB,MAAW,EACX,IAA8B;IAE9B,IACE,CAAC,CACC,MAAM,YAAY,WAAW;QAC7B,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC;QACjB,OAAO,IAAI,KAAK,QAAQ,CACzB,EACD;QACA,OAAO;KACR;IAED,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAE5D,MAAM,cAAc,GAAW,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,C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CAAC,EAClD;QACA,OAAO;KACR;IAED,MAAM,MAAM,GAAG,KAAK,WAElB,SAAiB,EACjB,GAAG,IAAW;QAEd,wEAAwE;QACxE,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QAC3E,IAAI,MAAM,GAAgC,EAAE,CAAC,KAAK,CAAC;QACnD,IAAI,QAAQ;YAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClD,MAAM,SAAS,GAAI,MAAc,CAAC,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAC3D,IAAI,OAAO;YAAE,MAAM,EAAE,CAAC,IAAI,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,YAAY,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1B,GAAG,QAAQ;IACX,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAC9B,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC;IAClE,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACpB,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,GAAI,CAAC,MAAM,EAAE,IAAI,CAAC;CAC3D,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/esm/entry.js.map b/build/esm/entry.js.map index 62a2239..b5cd5e0 100644 --- a/build/esm/entry.js.map +++ b/build/esm/entry.js.map @@ -1 +1 @@ -{"version":3,"file":"entry.js","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jE,IAAI,QAAQ;YAAE,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAEnB,OAAO,WAAW,CAAC;AACrB,CAAC;AASD;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CACtB,IAAY,EACZ,EAAE,OAAO,KAAwB,EAAE;IAEnC,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,OAAO;QAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC7C,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/build/esm/index.js b/build/esm/index.js index 4f026dc..a38132d 100644 --- a/build/esm/index.js +++ b/build/esm/index.js @@ -12,14 +12,14 @@ function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) const request = indexedDB.open(name, version); const openPromise = wrap(request); if (upgrade) { - request.addEventListener('upgradeneeded', event => { + request.addEventListener('upgradeneeded', (event) => { upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction)); }); } if (blocked) request.addEventListener('blocked', () => blocked()); openPromise - .then(db => { + .then((db) => { if (terminated) db.addEventListener('close', () => terminated()); if (blocking) @@ -74,7 +74,7 @@ function getMethod(target, prop) { cachedMethods.set(prop, method); return method; } -replaceTraps(oldTraps => ({ +replaceTraps((oldTraps) => ({ ...oldTraps, get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver), has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop), diff --git a/build/esm/util.d.ts.map b/build/esm/util.d.ts.map index a84b6b7..215b80d 100644 --- a/build/esm/util.d.ts.map +++ b/build/esm/util.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,oBAAY,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE3C,eAAO,MAAM,aAAa,uDAG+B,CAAC"} \ No newline at end of file +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,oBAAY,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE3C,eAAO,MAAM,aAAa,uDAGiC,CAAC"} \ No newline at end of file diff --git a/build/esm/util.js.map b/build/esm/util.js.map index ffab84f..b10e373 100644 --- a/build/esm/util.js.map +++ b/build/esm/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAW,EACX,YAA2B,EAClB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAW,EACX,YAA2B,EAClB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/build/esm/wrap-idb-value.js b/build/esm/wrap-idb-value.js index 590f37b..7dcbe4c 100644 --- a/build/esm/wrap-idb-value.js +++ b/build/esm/wrap-idb-value.js @@ -1,4 +1,4 @@ -const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c); +const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c); let idbProxyableTypes; let cursorAdvanceMethods; @@ -45,7 +45,7 @@ function promisifyRequest(request) { request.addEventListener('error', error); }); promise - .then(value => { + .then((value) => { // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval // (see wrapFunction). if (value instanceof IDBCursor) { diff --git a/build/esm/wrap-idb-value.js.map b/build/esm/wrap-idb-value.js.map index 2d4ba85..94b4a1d 100644 --- a/build/esm/wrap-idb-value.js.map +++ b/build/esm/wrap-idb-value.js.map @@ -1 +1 @@ -{"version":3,"file":"wrap-idb-value.js","sourceRoot":"","sources":["../../src/wrap-idb-value.ts"],"names":[],"mappings":"AAQA,OAAO,EAAqB,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE1D,IAAI,iBAAgC,CAAC;AACrC,IAAI,oBAA4B,CAAC;AAEjC,qEAAqE;AACrE,SAAS,oBAAoB;IAC3B,OAAO,CACL,iBAAiB;QACjB,CAAC,iBAAiB,GAAG;YACnB,WAAW;YACX,cAAc;YACd,QAAQ;YACR,SAAS;YACT,cAAc;SACf,CAAC,CACH,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,SAAS,uBAAuB;IAC9B,OAAO,CACL,oBAAoB;QACpB,CAAC,oBAAoB,GAAG;YACtB,SAAS,CAAC,SAAS,CAAC,OAAO;YAC3B,SAAS,CAAC,SAAS,CAAC,QAAQ;YAC5B,SAAS,CAAC,SAAS,CAAC,kBAAkB;SACvC,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,gBAAgB,GAGlB,IAAI,OAAO,EAAE,CAAC;AAClB,MAAM,kBAAkB,GAGpB,IAAI,OAAO,EAAE,CAAC;AAClB,MAAM,wBAAwB,GAG1B,IAAI,OAA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a,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC;QAC9C,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAEzC,iEAAiE;IACjE,OAAO,KAAK,CAAC;AACf,CAAC;AAeD,MAAM,UAAU,IAAI,CAAC,KAAU;IAC7B,gGAAgG;IAChG,2FAA2F;IAC3F,IAAI,KAAK,YAAY,UAAU;QAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEhE,+EAA+E;IAC/E,wDAAwD;IACxD,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAE/C,iCAAiC;IACjC,+DAA+D;IAC/D,IAAI,QAAQ,KAAK,KAAK,EAAE;QACtB,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACpC,qBAAqB,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC5C;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAoBD,MAAM,CAAC,MAAM,MAAM,GAAW,CAAC,KAAU,EAAO,EAAE,CAChD,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/simple-ts.js b/lib/simple-ts.js index 4fc100b..95ad6e5 100644 --- a/lib/simple-ts.js +++ b/lib/simple-ts.js @@ -44,12 +44,12 @@ export default function simpleTS(mainPath, { noBuild, watch } = {}) { let done = Promise.resolve(); if (!noBuild) { - done = new Promise(resolve => { + done = new Promise((resolve) => { const proc = spawn('tsc', args, { stdio: 'inherit', }); - proc.on('exit', code => { + proc.on('exit', (code) => { if (code !== 0) { throw Error('TypeScript build failed'); } @@ -111,7 +111,7 @@ export default function simpleTS(mainPath, { noBuild, watch } = {}) { const assetExtensions = ['.d.ts', '.js.map', '.d.ts.map']; await Promise.all( - assetExtensions.map(async extension => { + assetExtensions.map(async (extension) => { const fileName = basePath + extension; const source = await fsp.readFile(fileName); this.emitFile({ @@ -119,7 +119,7 @@ export default function simpleTS(mainPath, { noBuild, watch } = {}) { source, fileName: parse(fileName).base, }); - }) + }), ); return srcP; diff --git a/rollup.config.js b/rollup.config.js index 7a1e1b6..e4fd345 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,7 +7,7 @@ import del from 'del'; import simpleTS from './lib/simple-ts'; -export default async function({ watch }) { +export default async function ({ watch }) { await del('build'); const builds = []; diff --git a/src/async-iterators.ts b/src/async-iterators.ts index 4e6368d..4b327ff 100644 --- a/src/async-iterators.ts +++ b/src/async-iterators.ts @@ -14,7 +14,7 @@ const cursorIteratorTraps: ProxyHandler = { let cachedFunc = methodMap[prop as string]; if (!cachedFunc) { - cachedFunc = methodMap[prop as string] = function( + cachedFunc = methodMap[prop as string] = function ( this: IDBPCursor, ...args: any ) { @@ -64,7 +64,7 @@ function isIteratorProp(target: any, prop: number | string | symbol) { ); } -replaceTraps(oldTraps => ({ +replaceTraps((oldTraps) => ({ ...oldTraps, get(target, prop, receiver) { if (isIteratorProp(target, prop)) return iterate; diff --git a/src/database-extras.ts b/src/database-extras.ts index b6f8365..6d53c23 100644 --- a/src/database-extras.ts +++ b/src/database-extras.ts @@ -34,7 +34,7 @@ function getMethod( return; } - const method = async function( + const method = async function ( this: IDBPDatabase, storeName: string, ...args: any[] @@ -52,7 +52,7 @@ function getMethod( return method; } -replaceTraps(oldTraps => ({ +replaceTraps((oldTraps) => ({ ...oldTraps, get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get!(target, prop, receiver), diff --git a/src/entry.ts b/src/entry.ts index 06260ad..07dfe37 100644 --- a/src/entry.ts +++ b/src/entry.ts @@ -49,7 +49,7 @@ export function openDB( const openPromise = wrap(request) as Promise>; if (upgrade) { - request.addEventListener('upgradeneeded', event => { + request.addEventListener('upgradeneeded', (event) => { upgrade( wrap(request.result) as IDBPDatabase, event.oldVersion, @@ -62,7 +62,7 @@ export function openDB( if (blocked) request.addEventListener('blocked', () => blocked()); openPromise - .then(db => { + .then((db) => { if (terminated) db.addEventListener('close', () => terminated()); if (blocking) db.addEventListener('versionchange', () => blocking()); }) diff --git a/src/util.ts b/src/util.ts index 902ed5b..855eafb 100644 --- a/src/util.ts +++ b/src/util.ts @@ -4,4 +4,4 @@ export type Func = (...args: any[]) => any; export const instanceOfAny = ( object: any, constructors: Constructor[], -): boolean => constructors.some(c => object instanceof c); +): boolean => constructors.some((c) => object instanceof c); diff --git a/src/wrap-idb-value.ts b/src/wrap-idb-value.ts index 4707e73..6fff12c 100644 --- a/src/wrap-idb-value.ts +++ b/src/wrap-idb-value.ts @@ -71,7 +71,7 @@ function promisifyRequest(request: IDBRequest): Promise { }); promise - .then(value => { + .then((value) => { // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval // (see wrapFunction). if (value instanceof IDBCursor) { @@ -166,7 +166,7 @@ function wrapFunction(func: T): Function { func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype) ) { - return function( + return function ( this: IDBPDatabase, storeNames: string | string[], ...args: any[] @@ -186,7 +186,7 @@ function wrapFunction(func: T): Function { // with real promises, so each advance methods returns a new promise for the cursor object, or // undefined if the end of the cursor has been reached. if (getCursorAdvanceMethods().includes(func)) { - return function(this: IDBPCursor, ...args: Parameters) { + return function (this: IDBPCursor, ...args: Parameters) { // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use // the original object. func.apply(unwrap(this), args); @@ -194,7 +194,7 @@ function wrapFunction(func: T): Function { }; } - return function(this: any, ...args: Parameters) { + return function (this: any, ...args: Parameters) { // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use // the original object. return wrap(func.apply(unwrap(this), args)); diff --git a/test/index.ts b/test/index.ts index 647e00e..36dcfab 100644 --- a/test/index.ts +++ b/test/index.ts @@ -16,7 +16,7 @@ function loadScript(url: string): Promise { }); } -(async function() { +(async function () { const edgeCompat = navigator.userAgent.includes('Edge/'); if (!edgeCompat) await loadScript('./open.js'); diff --git a/test/main.ts b/test/main.ts index 6dda44a..978f60c 100644 --- a/test/main.ts +++ b/test/main.ts @@ -161,7 +161,7 @@ suite('IDBPDatabase', () => { ); }); - test('getKey', async function() { + test('getKey', async function () { if (!('getKey' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -191,7 +191,7 @@ suite('IDBPDatabase', () => { assert.strictEqual(val2, 'foo', 'Correct value'); }); - test('getKeyFromIndex', async function() { + test('getKeyFromIndex', async function () { if (!('getKey' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -219,7 +219,7 @@ suite('IDBPDatabase', () => { assert.strictEqual(val2, 4, 'Correct value'); }); - test('getAll', async function() { + test('getAll', async function () { if (!('getAll' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -246,7 +246,7 @@ suite('IDBPDatabase', () => { assert.deepStrictEqual(val2, [456, 123, 789], 'Correct values from store'); }); - test('getAllFromIndex', async function() { + test('getAllFromIndex', async function () { if (!('getAll' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -315,7 +315,7 @@ suite('IDBPDatabase', () => { ); }); - test('getAllKeys', async function() { + test('getAllKeys', async function () { if (!('getAllKeys' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -350,7 +350,7 @@ suite('IDBPDatabase', () => { ); }); - test('getAllKeysFromIndex', async function() { + test('getAllKeysFromIndex', async function () { if (!('getAllKeys' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1026,7 +1026,7 @@ suite('IDBPObjectStore', () => { assert.strictEqual(val2, 456, 'Correct value from store'); }); - test('getAll', async function() { + test('getAll', async function () { if (!('getAll' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1062,7 +1062,7 @@ suite('IDBPObjectStore', () => { assert.deepStrictEqual(val2, [456, 123, 789], 'Correct values from store'); }); - test('getAllKeys', async function() { + test('getAllKeys', async function () { if (!('getAllKeys' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1106,7 +1106,7 @@ suite('IDBPObjectStore', () => { ); }); - test('getKey', async function() { + test('getKey', async function () { if (!('getKey' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1206,7 +1206,7 @@ suite('IDBPObjectStore', () => { assert.instanceOf(cursor2, IDBCursorWithValue); }); - test('openKeyCursor', async function() { + test('openKeyCursor', async function () { if (!('openKeyCursor' in IDBObjectStore.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1489,7 +1489,7 @@ suite('IDBPIndex', () => { ); }); - test('getAll', async function() { + test('getAll', async function () { if (!('getAll' in IDBIndex.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -1579,7 +1579,7 @@ suite('IDBPIndex', () => { } }); - test('getAllKeys', async function() { + test('getAllKeys', async function () { if (!('getAllKeys' in IDBIndex.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -2013,7 +2013,7 @@ suite('IDBPCursor', () => { } }); - test('continuePrimaryKey', async function() { + test('continuePrimaryKey', async function () { if (!('continuePrimaryKey' in IDBCursor.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -2076,7 +2076,7 @@ suite('IDBPCursor', () => { } }); - test('delete', async function() { + test('delete', async function () { if (!('delete' in IDBCursor.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; @@ -2106,7 +2106,7 @@ suite('IDBPCursor', () => { } }); - test('update', async function() { + test('update', async function () { if (!('update' in IDBCursor.prototype)) this.skip(); const schemaDB = await openDBWithData(); db = schemaDB as IDBPDatabase; diff --git a/test/open.ts b/test/open.ts index 7de138f..a416357 100644 --- a/test/open.ts +++ b/test/open.ts @@ -95,7 +95,7 @@ suite('openDb', () => { ); // Let's do it the old fashioned way - const idb = await new Promise(async resolve => { + const idb = await new Promise(async (resolve) => { const request = indexedDB.open(dbName, getNextVersion()); wrappedRequest = wrap(request); request.addEventListener('success', () => resolve(request.result));