nano-persistent-memoizer
Memoizes a String -> String
or String -> Promise String
function persistently. It uses window.localStorage
on the browser and the filesystem (~/.nano-persistent-memoizer
) on Node. <1K compressed.
Usage
var memo = ; var twice = ; async { console; // slow console; // slow console; // instant (cached) console; // instant (cached) twiceclear; // clears cache};