UNPKG

@practicaloptimism/uniplexer

Version:

A multiplexer for 3rd party service providers and application protocols

24 lines (16 loc) 485 B
import { DeleteItem } from '../../../@utility/data-structures/database' import { storeTable } from '../variables' const deleteItem: DeleteItem = deleteItemFunction async function deleteItemFunction (storeId: string, itemId: string): Promise<boolean[]> { let hasError = false if (!storeTable[storeId]) { return [false] } await storeTable[storeId].removeItem(itemId, (err: any) => { hasError = err ? true : false }) return [hasError] } export { deleteItem }