ObjectStore.js

export const ObjectStore = (() => {
  const instance = new Map();
  return {
    get: key => instance.get(key),
    has: key => (instance.get(key) ? true : false),
    add: (key, value) => instance.set(key, value),
    reset: key => instance.set(key, null)
  };
})();