UNPKG

@practicaloptimism/uniplexer

Version:

A multiplexer for 3rd party service providers and application protocols

19 lines (13 loc) 424 B
import { GetItem } from '../../../@utility/data-structures/database' import { createItemStore } from './create-item-store' import { storeTable } from '../variables' const getItem: GetItem = method async function method (storeId: string, itemId: string): Promise<any[]> { if (!storeTable[storeId]) { await createItemStore(storeId) } return Promise.resolve([storeTable[storeId][itemId]]) } export { getItem }