idb-lru-cache
Advanced tools
Comparing version
@@ -9,6 +9,6 @@ import { IDBPCursorWithValue, IDBPCursorWithValueIteratorValue, IDBPObjectStore } from 'idb'; | ||
declare const RW = "readwrite"; | ||
declare type Expiry = Date; | ||
declare type Access = Date; | ||
declare type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; | ||
interface Fields<V> { | ||
export declare type Expiry = Date; | ||
export declare type Access = Date; | ||
export declare type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; | ||
export interface Fields<V> { | ||
[VALUE]: V; | ||
@@ -21,3 +21,3 @@ [EXPIRY]: Expiry; | ||
} | ||
interface Schema<K extends IDBValidKey, V> extends DBSchema { | ||
export interface Schema<K extends IDBValidKey, V> extends DBSchema { | ||
[STORE]: { | ||
@@ -32,5 +32,5 @@ key: K; | ||
} | ||
declare type IndexedField<K extends IDBValidKey, V> = keyof Schema<K, V>[typeof STORE]['indexes']; | ||
declare type DB<K extends IDBValidKey, V> = IDBPDatabase<Schema<K, V>>; | ||
interface Metadata { | ||
export declare type IndexedField<K extends IDBValidKey, V> = keyof Schema<K, V>[typeof STORE]['indexes']; | ||
export declare type DB<K extends IDBValidKey, V> = IDBPDatabase<Schema<K, V>>; | ||
export interface Metadata { | ||
[EXPIRY]: Expiry; | ||
@@ -64,3 +64,3 @@ [ACCESS]?: Access; | ||
} | ||
interface CacheOptions { | ||
export interface CacheOptions { | ||
dbName?: string; | ||
@@ -67,0 +67,0 @@ dbVersion?: number; |
@@ -9,6 +9,6 @@ import { IDBPCursorWithValue, IDBPCursorWithValueIteratorValue, IDBPObjectStore } from 'idb'; | ||
declare const RW = "readwrite"; | ||
declare type Expiry = Date; | ||
declare type Access = Date; | ||
declare type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; | ||
interface Fields<V> { | ||
export declare type Expiry = Date; | ||
export declare type Access = Date; | ||
export declare type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; | ||
export interface Fields<V> { | ||
[VALUE]: V; | ||
@@ -21,3 +21,3 @@ [EXPIRY]: Expiry; | ||
} | ||
interface Schema<K extends IDBValidKey, V> extends DBSchema { | ||
export interface Schema<K extends IDBValidKey, V> extends DBSchema { | ||
[STORE]: { | ||
@@ -32,5 +32,5 @@ key: K; | ||
} | ||
declare type IndexedField<K extends IDBValidKey, V> = keyof Schema<K, V>[typeof STORE]['indexes']; | ||
declare type DB<K extends IDBValidKey, V> = IDBPDatabase<Schema<K, V>>; | ||
interface Metadata { | ||
export declare type IndexedField<K extends IDBValidKey, V> = keyof Schema<K, V>[typeof STORE]['indexes']; | ||
export declare type DB<K extends IDBValidKey, V> = IDBPDatabase<Schema<K, V>>; | ||
export interface Metadata { | ||
[EXPIRY]: Expiry; | ||
@@ -64,3 +64,3 @@ [ACCESS]?: Access; | ||
} | ||
interface CacheOptions { | ||
export interface CacheOptions { | ||
dbName?: string; | ||
@@ -67,0 +67,0 @@ dbVersion?: number; |
{ | ||
"name": "idb-lru-cache", | ||
"description": "IndexedDB-based persisting LRU cache for the browser", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"license": "AGPL-3.0", | ||
@@ -63,3 +63,3 @@ "author": "make-github-pseudonymous-again", | ||
"tc:watch": "yarn tc --noErrorTruncation --watch", | ||
"test": "aba test" | ||
"test": "aba test --timeout 30s" | ||
}, | ||
@@ -66,0 +66,0 @@ "dependencies": { |
@@ -29,3 +29,3 @@ [idb-lru-cache](https://make-github-pseudonymous-again.github.io/idb-lru-cache) | ||
[](https://codeclimate.com/github/make-github-pseudonymous-again/idb-lru-cache/trends/technical_debt) | ||
[](https://make-github-pseudonymous-again.github.io/idb-lru-cache/source.html) | ||
[](https://make-github-pseudonymous-again.github.io/idb-lru-cache/modules.html) | ||
[](https://bundlephobia.com/result?p=idb-lru-cache) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
497242
0.05%