sindresorhus/quick-lru

`.entries` method

silverwind opened this issue · 2 comments

There are .keys and .values methods mimicking the same-named Object methods, but not there seems to be no equivalent of Object.entries which I think might be handy sometimes. It should return a iterable of [key, value].

From the docs:

The instance is iterable so you can use it directly in a for…of loop.

for (const [key, value] of lru) {
 // ...
}

Ah missed that part, sorry.