`.entries` method
silverwind opened this issue · 2 comments
silverwind commented
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]
.
sindresorhus commented
From the docs:
The instance is iterable so you can use it directly in a for…of loop.
for (const [key, value] of lru) {
// ...
}
silverwind commented
Ah missed that part, sorry.