This practice covers the following:
- Function as First Citizen.
- ES6 features.
- BDD with Mocha and Chai.
- NPM infrastructure.
Memoize function idea has been taken from Lodash. Please take a look to the original specification. Then study the differences list:
- Cache key generation strategy is not customizable. Resolver support is not necessary.
- All arguments should be considered by caching mechanism. Not only the first argument.
- Fork this repository.
- Checkout forked repository.
- Install Node.js.
- Install project dependencies by
npm install. - Run tests by
npm run test(tests should fail). - Go to the src folder and implement memoize function.
- Check your progress against specification (tests).
- And don't forget to commit working decision ;)
- Extend original specification in test/memoize.spec.js with additional requirements.
- Try to simplify your decision by means of Lodash library.
- Propose the way to deal with ES2016 Decorators and implement some example.