export class Store < T > { store : Map < string , T > ; constructor ( data = { } ) { this . store = new Map ( Object . entries ( data ) ) ; } get ( key ) { return this . store . get ( key ) ; } set ( key , value ) { this . store . set ( key , value ) ; } forEach ( fn ) { this . store . forEach ( fn ) ; } }