memorize-one
Memorition function which return cache result when identity inputs.
Install
yarn add memorize-one
Usage
const memorizeOne = let i = 0const fn = ++i const memoFn = // 1 // 1 const a = age: 1 aobj = a const b = age: 1 bobj = b // 2 // 2 //=> foo
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
memorize-one © Eliaztray, Released under the MIT License.
Authored and maintained by Eliaztray with help from contributors (list).
eliaztray · GitHub @Eliaztray · Twitter @eliaztray