Comparing version 0.2.55 to 0.2.56
@@ -12,8 +12,8 @@ export function rtop(request: IDBRequest): Promise<any>; | ||
export function addAutoKey(store: IDBObjectStore, item: string | number | ArrayBuffer | Date): Promise<number>; | ||
export function getAll(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<any>>; | ||
export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<any>>; | ||
export function getAll(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>; | ||
export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>; | ||
export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<any>; | ||
export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>; | ||
export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>; | ||
export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<KeyValuePair>>; | ||
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>; | ||
@@ -20,0 +20,0 @@ export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; |
@@ -12,8 +12,8 @@ export function rtop(request: IDBRequest): Promise<any>; | ||
export function addAutoKey(store: IDBObjectStore, item: string | number | ArrayBuffer | Date): Promise<number>; | ||
export function getAll(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<any>>; | ||
export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<any>>; | ||
export function getAll(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>; | ||
export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>; | ||
export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<any>; | ||
export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>; | ||
export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>; | ||
export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<Array<KeyValuePair>>; | ||
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>; | ||
@@ -20,0 +20,0 @@ export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>; |
@@ -152,6 +152,7 @@ /* eslint-env browser */ | ||
* @param {IDBKeyRange} [range] | ||
* @param {number} [limit] | ||
* @return {Promise<Array<any>>} | ||
*/ | ||
export const getAll = (store, range) => | ||
rtop(store.getAll(range)) | ||
export const getAll = (store, range, limit) => | ||
rtop(store.getAll(range, limit)) | ||
@@ -162,6 +163,7 @@ /* istanbul ignore next */ | ||
* @param {IDBKeyRange} [range] | ||
* @param {number} [limit] | ||
* @return {Promise<Array<any>>} | ||
*/ | ||
export const getAllKeys = (store, range) => | ||
rtop(store.getAllKeys(range)) | ||
export const getAllKeys = (store, range, limit) => | ||
rtop(store.getAllKeys(range, limit)) | ||
@@ -210,7 +212,8 @@ /** | ||
* @param {IDBKeyRange} [range] | ||
* @param {number} [limit] | ||
* @return {Promise<Array<KeyValuePair>>} | ||
*/ | ||
export const getAllKeysValues = (store, range) => | ||
export const getAllKeysValues = (store, range, limit) => | ||
// @ts-ignore | ||
promise.all([getAllKeys(store, range), getAll(store, range)]).then(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))) | ||
promise.all([getAllKeys(store, range, limit), getAll(store, range, limit)]).then(([ks, vs]) => ks.map((k, i) => ({ k, v: vs[i] }))) | ||
@@ -217,0 +220,0 @@ /* istanbul ignore next */ |
{ | ||
"name": "lib0", | ||
"version": "0.2.55", | ||
"version": "0.2.56", | ||
"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
1080611
18957