0.0.5 • Published 7 years ago
memoize-proxy v0.0.5
memoize-proxy
Memoize functions
MemoizeProxy(functionToProxy) ⇒ proxy
MemoizeProxy - provides a proxy for memoizing functions
Kind: global function
Returns: proxy - the proxy to that function
Param | Type | Description |
---|---|---|
functionToProxy | function | the function to proxy |
Example
let fib = n => (n <= 1 ? 1 : fib(n - 1) + fib(n - 2));
fib = new MemoizeProxy(fib);
fib(100);
Scripts
test
– run the tests
npm run test
coverage
– generate and view code coverage as HTML
npm run coverage
lint
– lint the codebase
npm run lint
readme
– generate the README
npm run readme
compile
– compile the code
npm run compile
License
MIT @ Flip