basic-lru
Social Media Photo by Mr Cup / Fabien Barral on Unsplash

A fast and lightweight, as in 684 bytes, Map based LRU implementation.
import LRU from 'basic-lru';
const LRU = require('basic-lru');
const lru = new LRU(100);
const lru = new LRU({max: 1000});
const lru = new LRU({maxAge: 1000});
const lru = new LRU({max: 100, maxAge: 1000});
const lru = new LRU({maxSize: 100, maxAge: 1000});
About
This module is a drop-in replacement for any Map instance, and it's mostly 100% compatible with lru, lru-cache, quick-lru, and lru-map modules.
Differently from other modules, this one has the least amount of LOC, zero dependencies, and it's based on ES2015 class capability to extend the native Map.
The Map Extend Differences
The only difference from a real Map, beside implementing a classic LRU cache, is the peek(key) method, to access an entry without flagging its access time anyhow, and borrowed from other libraries, plus a constructor, also borrowed from other libraries, that accepts either an integer, or an options object with max, or maxSize, and a maxAge property, where all of these are optional too.