Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idb

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idb - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

build/cjs/chunk.js

@@ -112,3 +112,3 @@ 'use strict';

if (func === IDBDatabase.prototype.transaction &&
'objectStoreNames' in IDBTransaction.prototype) {
!('objectStoreNames' in IDBTransaction.prototype)) {
return function (storeNames, ...args) {

@@ -115,0 +115,0 @@ const tx = func.call(unwrap(this), storeNames, ...args);

@@ -52,24 +52,19 @@ 'use strict';

const useIndex = prop !== targetFuncName;
const isWrite = writeMethods.includes(targetFuncName);
if (
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
if (!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype)) {
!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||
!(isWrite || readMethods.includes(targetFuncName)))
return;
}
let method;
if (readMethods.includes(targetFuncName)) {
method = function (storeName, ...args) {
let target = this.transaction(storeName).store;
if (useIndex)
target = target.index(args.shift());
return target[targetFuncName](...args);
};
}
if (writeMethods.includes(targetFuncName)) {
method = function (storeName, ...args) {
const tx = this.transaction(storeName, 'readwrite');
tx.store[targetFuncName](...args);
return tx.done;
};
}
if (method)
cachedMethods.set(prop, method);
const method = async function (storeName, ...args) {
const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');
let target = tx.store;
if (useIndex)
target = target.index(args.shift());
const returnVal = target[targetFuncName](...args);
if (isWrite)
await tx.done;
return returnVal;
};
cachedMethods.set(prop, method);
return method;

@@ -76,0 +71,0 @@ }

@@ -110,3 +110,3 @@ const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c);

if (func === IDBDatabase.prototype.transaction &&
'objectStoreNames' in IDBTransaction.prototype) {
!('objectStoreNames' in IDBTransaction.prototype)) {
return function (storeNames, ...args) {

@@ -113,0 +113,0 @@ const tx = func.call(unwrap(this), storeNames, ...args);

@@ -49,24 +49,19 @@ import { a as wrap, b as addTraps } from './chunk.js';

const useIndex = prop !== targetFuncName;
const isWrite = writeMethods.includes(targetFuncName);
if (
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
if (!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype)) {
!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||
!(isWrite || readMethods.includes(targetFuncName)))
return;
}
let method;
if (readMethods.includes(targetFuncName)) {
method = function (storeName, ...args) {
let target = this.transaction(storeName).store;
if (useIndex)
target = target.index(args.shift());
return target[targetFuncName](...args);
};
}
if (writeMethods.includes(targetFuncName)) {
method = function (storeName, ...args) {
const tx = this.transaction(storeName, 'readwrite');
tx.store[targetFuncName](...args);
return tx.done;
};
}
if (method)
cachedMethods.set(prop, method);
const method = async function (storeName, ...args) {
const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');
let target = tx.store;
if (useIndex)
target = target.index(args.shift());
const returnVal = target[targetFuncName](...args);
if (isWrite)
await tx.done;
return returnVal;
};
cachedMethods.set(prop, method);
return method;

@@ -73,0 +68,0 @@ }

@@ -1,1 +0,1 @@

var idb=function(e){"use strict";const t=(e,t)=>t.some(t=>e instanceof t);let n,r;const o=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap;let u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("objectStoreNames"===t)return e.objectStoreNames||i.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return p(e[t])},has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){return e===IDBDatabase.prototype.transaction&&"objectStoreNames"in IDBTransaction.prototype?function(t,...n){const r=e.call(l(this),t,...n);return i.set(r,t.sort?t.sort():[t]),p(r)}:(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(l(this),t),p(o.get(this))}:function(...t){return p(e.apply(l(this),t))}}function f(e){return"function"==typeof e?d(e):(e instanceof IDBTransaction&&function(e){if(s.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});s.set(e,t)}(e),t(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,u):e)}function p(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(p(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&o.set(t,e)}),c.set(t,e),t}(e);if(a.has(e))return a.get(e);const t=f(e);return t!==e&&(a.set(e,t),c.set(t,e)),t}const l=e=>c.get(e);const D=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],B=new Map;function I(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(B.get(t))return B.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n;if(!(n in(r?IDBIndex:IDBObjectStore).prototype))return;let o;return D.includes(n)&&(o=function(e,...t){let o=this.transaction(e).store;return r&&(o=o.index(t.shift())),o[n](...t)}),v.includes(n)&&(o=function(e,...t){const r=this.transaction(e,"readwrite");return r.store[n](...t),r.done}),o&&B.set(t,o),o}return u=(e=>({get:(t,n,r)=>I(t,n)||e.get(t,n,r),has:(t,n)=>!!I(t,n)||e.has(t,n)}))(u),e.openDB=function(e,t,{blocked:n,upgrade:r,blocking:o}={}){const s=indexedDB.open(e,t),i=p(s);return r&&s.addEventListener("upgradeneeded",e=>{r(p(s.result),e.oldVersion,e.newVersion,p(s.transaction))}),n&&s.addEventListener("blocked",()=>n()),o&&i.then(e=>e.addEventListener("versionchange",o)),i},e.deleteDB=function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),p(n).then(()=>void 0)},e.unwrap=l,e.wrap=p,e}({});
var idb=function(e){"use strict";const t=(e,t)=>t.some(t=>e instanceof t);let n,r;const o=new WeakMap,s=new WeakMap,a=new WeakMap,i=new WeakMap,c=new WeakMap;let u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("objectStoreNames"===t)return e.objectStoreNames||a.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return p(e[t])},has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(l(this),t),p(o.get(this))}:function(...t){return p(e.apply(l(this),t))}:function(t,...n){const r=e.call(l(this),t,...n);return a.set(r,t.sort?t.sort():[t]),p(r)}}function f(e){return"function"==typeof e?d(e):(e instanceof IDBTransaction&&function(e){if(s.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});s.set(e,t)}(e),t(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,u):e)}function p(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(p(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&o.set(t,e)}),c.set(t,e),t}(e);if(i.has(e))return i.get(e);const t=f(e);return t!==e&&(i.set(e,t),c.set(t,e)),t}const l=e=>c.get(e);const D=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],B=new Map;function I(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(B.get(t))return B.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!D.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let a=s.store;r&&(a=a.index(t.shift()));const i=a[n](...t);return o&&await s.done,i};return B.set(t,s),s}return u=(e=>({get:(t,n,r)=>I(t,n)||e.get(t,n,r),has:(t,n)=>!!I(t,n)||e.has(t,n)}))(u),e.openDB=function(e,t,{blocked:n,upgrade:r,blocking:o}={}){const s=indexedDB.open(e,t),a=p(s);return r&&s.addEventListener("upgradeneeded",e=>{r(p(s.result),e.oldVersion,e.newVersion,p(s.transaction))}),n&&s.addEventListener("blocked",()=>n()),o&&a.then(e=>e.addEventListener("versionchange",o)),a},e.deleteDB=function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),p(n).then(()=>void 0)},e.unwrap=l,e.wrap=p,e}({});

@@ -1,1 +0,1 @@

var idb=function(e){"use strict";const t=(e,t)=>t.some(t=>e instanceof t);let n,r;const o=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap;let u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("objectStoreNames"===t)return e.objectStoreNames||i.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return l(e[t])},has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){u=e(u)}function f(e){return e===IDBDatabase.prototype.transaction&&"objectStoreNames"in IDBTransaction.prototype?function(t,...n){const r=e.call(D(this),t,...n);return i.set(r,t.sort?t.sort():[t]),l(r)}:(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(D(this),t),l(o.get(this))}:function(...t){return l(e.apply(D(this),t))}}function p(e){return"function"==typeof e?f(e):(e instanceof IDBTransaction&&function(e){if(s.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});s.set(e,t)}(e),t(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,u):e)}function l(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(l(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&o.set(t,e)}),c.set(t,e),t}(e);if(a.has(e))return a.get(e);const t=p(e);return t!==e&&(a.set(e,t),c.set(t,e)),t}const D=e=>c.get(e);const I=["get","getKey","getAll","getAllKeys","count"],B=["put","add","delete","clear"],v=new Map;function g(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(v.get(t))return v.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n;if(!(n in(r?IDBIndex:IDBObjectStore).prototype))return;let o;return I.includes(n)&&(o=function(e,...t){let o=this.transaction(e).store;return r&&(o=o.index(t.shift())),o[n](...t)}),B.includes(n)&&(o=function(e,...t){const r=this.transaction(e,"readwrite");return r.store[n](...t),r.done}),o&&v.set(t,o),o}d(e=>({get:(t,n,r)=>g(t,n)||e.get(t,n,r),has:(t,n)=>!!g(t,n)||e.has(t,n)}));const b=["continue","continuePrimaryKey","advance"],y={},h=new WeakMap,m=new WeakMap,w={get(e,t){if(!b.includes(t))return e[t];let n=y[t];return n||(n=y[t]=function(...e){h.set(this,m.get(this)[t](...e))}),n}};async function*E(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,w);for(m.set(n,t),c.set(n,D(t));t;)yield n,t=await(h.get(n)||t.continue()),h.delete(n)}function L(e,n){return n===Symbol.asyncIterator&&t(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===n&&t(e,[IDBIndex,IDBObjectStore])}return d(e=>({get:(t,n,r)=>L(t,n)?E:e.get(t,n,r),has:(t,n)=>L(t,n)||e.has(t,n)})),e.openDB=function(e,t,{blocked:n,upgrade:r,blocking:o}={}){const s=indexedDB.open(e,t),i=l(s);return r&&s.addEventListener("upgradeneeded",e=>{r(l(s.result),e.oldVersion,e.newVersion,l(s.transaction))}),n&&s.addEventListener("blocked",()=>n()),o&&i.then(e=>e.addEventListener("versionchange",o)),i},e.deleteDB=function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),l(n).then(()=>void 0)},e.unwrap=D,e.wrap=l,e}({});
var idb=function(e){"use strict";const t=(e,t)=>t.some(t=>e instanceof t);let n,r;const o=new WeakMap,s=new WeakMap,a=new WeakMap,i=new WeakMap,c=new WeakMap;let u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("objectStoreNames"===t)return e.objectStoreNames||a.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return l(e[t])},has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){u=e(u)}function f(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(D(this),t),l(o.get(this))}:function(...t){return l(e.apply(D(this),t))}:function(t,...n){const r=e.call(D(this),t,...n);return a.set(r,t.sort?t.sort():[t]),l(r)}}function p(e){return"function"==typeof e?f(e):(e instanceof IDBTransaction&&function(e){if(s.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});s.set(e,t)}(e),t(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,u):e)}function l(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(l(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&o.set(t,e)}),c.set(t,e),t}(e);if(i.has(e))return i.get(e);const t=p(e);return t!==e&&(i.set(e,t),c.set(t,e)),t}const D=e=>c.get(e);const I=["get","getKey","getAll","getAllKeys","count"],B=["put","add","delete","clear"],v=new Map;function g(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(v.get(t))return v.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=B.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!I.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let a=s.store;r&&(a=a.index(t.shift()));const i=a[n](...t);return o&&await s.done,i};return v.set(t,s),s}d(e=>({get:(t,n,r)=>g(t,n)||e.get(t,n,r),has:(t,n)=>!!g(t,n)||e.has(t,n)}));const y=["continue","continuePrimaryKey","advance"],b={},h=new WeakMap,m=new WeakMap,w={get(e,t){if(!y.includes(t))return e[t];let n=b[t];return n||(n=b[t]=function(...e){h.set(this,m.get(this)[t](...e))}),n}};async function*E(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,w);for(m.set(n,t),c.set(n,D(t));t;)yield n,t=await(h.get(n)||t.continue()),h.delete(n)}function L(e,n){return n===Symbol.asyncIterator&&t(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===n&&t(e,[IDBIndex,IDBObjectStore])}return d(e=>({get:(t,n,r)=>L(t,n)?E:e.get(t,n,r),has:(t,n)=>L(t,n)||e.has(t,n)})),e.openDB=function(e,t,{blocked:n,upgrade:r,blocking:o}={}){const s=indexedDB.open(e,t),a=l(s);return r&&s.addEventListener("upgradeneeded",e=>{r(l(s.result),e.oldVersion,e.newVersion,l(s.transaction))}),n&&s.addEventListener("blocked",()=>n()),o&&a.then(e=>e.addEventListener("versionchange",o)),a},e.deleteDB=function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),l(n).then(()=>void 0)},e.unwrap=D,e.wrap=l,e}({});

@@ -20,26 +20,21 @@ import { Func } from './util';

const useIndex = prop !== targetFuncName;
const isWrite = writeMethods.includes(targetFuncName);
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
if (!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype)) {
return;
}
if (
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||
!(isWrite || readMethods.includes(targetFuncName))
) return;
let method: Func | undefined;
const method = async function (this: IDBPDatabase, storeName: string, ...args: any[]) {
// isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(
const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');
let target: IDBPObjectStore | IDBPIndex = tx.store;
if (useIndex) target = target.index(args.shift());
const returnVal = (target as any)[targetFuncName](...args);
if (isWrite) await tx.done;
return returnVal;
};
if (readMethods.includes(targetFuncName)) {
method = function (this: IDBPDatabase, storeName: string, ...args: any[]) {
let target: IDBPObjectStore | IDBPIndex = this.transaction(storeName).store;
if (useIndex) target = target.index(args.shift());
return (target as any)[targetFuncName](...args);
};
}
if (writeMethods.includes(targetFuncName)) {
method = function (this: IDBPDatabase, storeName: string, ...args: any[]) {
const tx = this.transaction(storeName, 'readwrite');
(tx.store as any)[targetFuncName](...args);
return tx.done;
};
}
if (method) cachedMethods.set(prop, method);
cachedMethods.set(prop, method);
return method;

@@ -46,0 +41,0 @@ }

@@ -127,3 +127,3 @@ import {

func === IDBDatabase.prototype.transaction &&
'objectStoreNames' in IDBTransaction.prototype
!('objectStoreNames' in IDBTransaction.prototype)
) {

@@ -130,0 +130,0 @@ return function (this: IDBPDatabase, storeNames: string | string[], ...args: any[]) {

{
"name": "idb",
"version": "4.0.0",
"version": "4.0.1",
"description": "A small wrapper that makes IndexedDB usable",

@@ -9,3 +9,3 @@ "main": "build/cjs/index.js",

"scripts": {
"clean": "rm -r build test-build",
"clean": "rm -rf build test-build",
"build": "npm run clean && rollup -c && gzip-size build/iife/index-min.js && gzip-size build/iife/with-async-ittr-min.js",

@@ -27,3 +27,3 @@ "dev": "npm run clean && rollup -c --watch"

"mocha": "^6.0.2",
"rollup": "^1.6.0",
"rollup": "^1.6.1",
"rollup-plugin-commonjs": "^9.2.1",

@@ -33,8 +33,8 @@ "rollup-plugin-copy": "^0.2.3",

"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.19.3",
"tslint": "^5.13.1",
"rollup-plugin-typescript2": "^0.20.1",
"tslint": "^5.14.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-react": "^3.6.0",
"typescript": "^3.3.3333"
"typescript": "^3.3.4000"
}
}
# IndexedDB with usability.
This is a tiny (~1.13k) library that mostly mirrors the IndexedDB API, but with small improvements that make a big difference to usability.
This is a tiny (~1.15k) library that mostly mirrors the IndexedDB API, but with small improvements that make a big difference to usability.

@@ -5,0 +5,0 @@ 1. [Installation](#installation)

@@ -456,2 +456,4 @@ import 'mocha/mocha';

assert.strictEqual(key, 'new');
const val = await schemaDB.get('key-val-store', 'new');

@@ -472,2 +474,4 @@

assert.strictEqual(key2, 5);
const val2 = await db.get('object-store', 5);

@@ -509,2 +513,4 @@

assert.strictEqual(key, 'new');
const val = await schemaDB.get('key-val-store', 'new');

@@ -525,2 +531,4 @@

assert.strictEqual(key2, 5);
const val2 = await db.get('object-store', 5);

@@ -1991,3 +1999,3 @@

cursor = await cursor.continue(new Date('2019-01-02T05:00:00'));
cursor = await cursor.continue(new Date('2019-01-02T05:00:00.000Z'));

@@ -2052,3 +2060,3 @@ if (!cursor) {

cursor = await cursor.continuePrimaryKey(
new Date('2019-01-02T05:00:00'),
new Date('2019-01-02T05:00:00.000Z'),
1.5,

@@ -2055,0 +2063,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc