Returns the cached function results if already runned with this method
const test = cache(() => setTimeout(console.log, 1000, test)); test(); // takes a second to log 'test' test(); // instantly logs the second 'test'
test
Generated using TypeDoc
Returns the cached function results if already runned with this method
Example
const test = cache(() => setTimeout(console.log, 1000,
test
)); test(); // takes a second to log 'test' test(); // instantly logs the second 'test'