UNPKG

@practicaloptimism/uniplexer

Version:

A multiplexer for 3rd party service providers and application protocols

21 lines (14 loc) 503 B
import { GetItemList } from '../../../@utility/data-structures/database' import { createItemStore } from './create-item-store' import { storeTable } from '../variables' const getItemList: GetItemList = method async function method (storeId: string): Promise<any[]> { if (!storeTable[storeId]) { await createItemStore(storeId) } const resultList: any[] = Object.keys(storeTable[storeId]).map((itemId) => storeTable[itemId]) return Promise.resolve(resultList) } export { getItemList }