erikras / lru-memoize

A utility to provide LRU memoization for any js function
MIT License
316 stars 20 forks source link

simpler API #69

Closed testerez closed 8 years ago

testerez commented 8 years ago

Why don't you use a simpler API, like this?

erikras commented 8 years ago

Two main reasons.

  1. This way the library creates a memoizing function that could be reused.
  2. Potential for future use as an ES7 decorator.
testerez commented 8 years ago

I didn't know about decorators thanks!