import { Collection } from 'mongodb' import * as db from '../db' const store = new Map() export default class Data { static setStore(key: string, collection: Collection) { store.set(key, collection) } static getStore(key: string): Collection { return store.get(key) } static getCollection(name: string): Collection { return db.collection(name) } }