Open fregante opened 1 year ago
I would prefer to fix main signature. Maybe a new option instead of setting cache
to false
? The problem with exporting a separate method is that we have to explain it doesn't have a cache
setting and also need to add yet another method for a decorator version.
@Richienb Any thoughts on this?
I don't think that's a big ask. The documentation would look like
Like mem, but just while pending. The options are the same except you can't pass a custom cache.
Same for the decorator. I do agree it's not optimal but… in the code it still reads better than any option could, IMHO
Maybe a new option instead of setting cache to false?
cache: pending
?
I think cache: 'while-pending'
is clear enough. "Pending" alone doesn't give enough information and still requires a comment
Let's go with cache: 'while-pending'
.
I don't know what this means:
I have to document it every time:
The module can export a more readable helper instead:
Note: the types of
opts
should excludecache
Some tags could also be added to package.json