this.store.has(key)) { this.store.set(key, new Map()); } const innerMap = this.store.get(key); innerMap.set(nestedKey, value); } /** * Removes the value associated to the key and nestedKey. * * @param {object} key * The key associated with the desired value. * @param {string} nestedKey * The nested key associated with the desired value. * * @returns True if an element in the store has been removed successfully. * False if the key is not found in the store. */ delete(key, nestedKey) { if (!this.store.has(key)) { return false; } return this.store.get(key).delete(nestedKey); } /** * Clear the store. */ clear() { this.store = new WeakMap(); } } module.exports = WeakMapMap; PK