construct-cacheable-function
v1.0.0
Published
Converts regular function into cacheable one, which returns result for known parameters immediately, without calling the original function first.
Downloads
3
Readme
constructCacheableFunction
Converts regular function into cacheable one, which returns result for known arguments immediately, without calling the original function first.
Documentation
constructCacheableFunction
Converts function into cacheable version. It remembers result of all calls of the function. If a call is made with known parameters, it immediately returns cached result, without calling the original function.
Parameters
fn
Function Original function.
Returns Function Cacheable version of original function.
Bug reports, feature requests and contact
If you found any bugs, if you have feature requests or any questions, please, either file an issue at GitHub or send me an e-mail at [email protected].
License
constructCacheableFunction is published under the MIT license.