MCPcopy
hub / github.com/jakearchibald/idb-keyval / get

Function get

src/index.ts:58–63  ·  view source on GitHub ↗
(
  key: IDBValidKey,
  customStore = defaultGetStore(),
)

Source from the content-addressed store, hash-verified

56 * @param customStore Method to get a custom store. Use with caution (see the docs).
57 */
58export function get<T = any>(
59 key: IDBValidKey,
60 customStore = defaultGetStore(),
61): Promise<T | undefined> {
62 return customStore('readonly', (store) => promisifyRequest(store.get(key)));
63}
64
65/**
66 * Set a value with a key.

Callers 1

index.tsFile · 0.90

Calls 2

defaultGetStoreFunction · 0.85
promisifyRequestFunction · 0.85

Tested by

no test coverage detected