isaacs / node-lru-cache

A fast cache that automatically deletes the least recently used items
http://isaacs.github.io/node-lru-cache/
ISC License
5.38k stars 353 forks source link

version 5.x not es5 compatible #167

Closed ayal closed 2 years ago

ayal commented 4 years ago

Is this package written only for node? some packages already use it in client side code:

https://github.com/kuitos/axios-extensions/issues/74

So maybe it makes sense to keep es5 compatibility when releasing?

celesteking commented 4 years ago

I'd suggest using babeljs or similar.

trivikr commented 3 years ago

The ES5 compatibility was dropped when classes were used in commit https://github.com/isaacs/node-lru-cache/commit/9ce69193c4cefbeee27e759b1cf94e02a3eadf8b, which was released with v5.0.0

isaacs commented 2 years ago

This is written for node. If someone wants to use the code in browsers, deno, refrigerators, that's lovely, but it's on them to make it work.