code: function remove(key) {
    const entry = this._keymap[key];
    if (!entry) return undefined;
    delete this._keymap[entry.key]; // need to do delete unfortunately
    if (entry.newer && entry.older) {
      // relink the older entry with the newer entry
      entry.older.newer = entry.newer;
      entry.newer.older = entry.older;
    } else if (entry.newer) {
      // remove the link to us
      entry.newer.older = undefined;
      // link the newer entry to head
      this.head = entry.newer;
    } else if (entry.older) {
      // remove the link to us
      entry.older.newer = undefined;
      // link the newer entry to head
      this.tail = entry.older;
    } else {
      this.head = undefined;
      this.tail = undefined;
    }
  
    this.size -= 1;
    return entry.value;
  }
docs: Remove entry <key> from cache and return its value. Returns undefined if not
  found.