UNPKG

@practicaloptimism/uniplexer

Version:

A multiplexer for 3rd party service providers and application protocols

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