UNPKG

@practicaloptimism/uniplexer

Version:

A multiplexer for 3rd party service providers and application protocols

22 lines (14 loc) 484 B
import { DoesExistItem } from '../../../@utility/data-structures/database' import { createItemStore } from './create-item-store' import { storeTable } from '../variables' const doesExistItem: DoesExistItem = method async function method (storeId: string, itemId: string): Promise<boolean[]> { if (!storeTable[storeId]) { await createItemStore(storeId) } const doesExist = storeTable[storeId][itemId] return Promise.resolve([doesExist]) } export { doesExistItem }