denim-memoize
v1.0.2
Published
Utility to memoize functions
Downloads
3
Readme
denim-memoize
This utility was built to generically memoize a function.
Getting Started
yarn add denim-memoize
Prerequisites
None
Installing
Clone the repo
yarn add denim-memoize
ES6 Import
import memoizeFactory from 'denim-memoize'
CommonJS
const memoizeFactory = require('denim-memoize')
Usage
import memoizeFactory from 'denim-memoize'
const myFunction = () => {
return 'Hello Memoizer'
}
const memoizedMyFunction = memoizeFactory(myFunction)
// to get memoization, now just use memoizedMyFunction in place of myFunction
let result = memoizedMyFunction()
Running the tests
yarn test
Deployment
yarn publish --new-version NEWVER
Built With
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Michael W. Clark - Initial work - MichaelWClark
License
This project is licensed under the MIT License - see the LICENSE.md file for details