Comparing version 0.2.56 to 0.2.57
@@ -18,4 +18,4 @@ export function rtop(request: IDBRequest): Promise<any>; | ||
export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<KeyValuePair>>; | ||
export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function getStore(t: IDBTransaction, store: string): IDBObjectStore; | ||
@@ -22,0 +22,0 @@ export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; |
@@ -18,4 +18,4 @@ export function rtop(request: IDBRequest): Promise<any>; | ||
export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<KeyValuePair>>; | ||
export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; | ||
export function getStore(t: IDBTransaction, store: string): IDBObjectStore; | ||
@@ -22,0 +22,0 @@ export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange; |
@@ -220,3 +220,3 @@ /* eslint-env browser */ | ||
* @param {any} request | ||
* @param {function(IDBCursorWithValue):void|boolean} f | ||
* @param {function(IDBCursorWithValue):void|boolean|Promise<void|boolean>} f | ||
* @return {Promise<void>} | ||
@@ -230,5 +230,6 @@ */ | ||
*/ | ||
request.onsuccess = event => { | ||
request.onsuccess = async event => { | ||
const cursor = event.target.result | ||
if (cursor === null || f(cursor) === false) { | ||
const res = await f(cursor) | ||
if (cursor === null || res === false) { | ||
return resolve() | ||
@@ -245,3 +246,3 @@ } | ||
* @param {IDBKeyRange|null} keyrange | ||
* @param {function(any,any):void|boolean} f Callback that receives (value, key) | ||
* @param {function(any,any):void|boolean|Promise<void|boolean>} f Callback that receives (value, key) | ||
* @param {'next'|'prev'|'nextunique'|'prevunique'} direction | ||
@@ -258,3 +259,3 @@ */ | ||
* @param {IDBKeyRange|null} keyrange | ||
* @param {function(any):void|boolean} f callback that receives the key | ||
* @param {function(any):void|boolean|Promise<void|boolean>} f callback that receives the key | ||
* @param {'next'|'prev'|'nextunique'|'prevunique'} direction | ||
@@ -261,0 +262,0 @@ */ |
{ | ||
"name": "lib0", | ||
"version": "0.2.56", | ||
"version": "0.2.57", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1081228
18959