Feature idea: tell memoizee not to memoize a result.
Right now if i never want to memoize an undefined result, i have to write a wrapper lambda that deletes it right after memoizee adds it. Which is OK. But it woudl be cool if there was an optional argument:
Feature idea: tell memoizee not to memoize a result.
Right now if i never want to memoize an undefined result, i have to write a wrapper lambda that deletes it right after memoizee adds it. Which is OK. But it woudl be cool if there was an optional argument:
memoized = memoize(afn, { promise: true, except:(res)=>{res == undefined} })
I can submit a pull req if you like the idea.