-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Feat: Added Memoize Func #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cache/Memoize.js
Outdated
*/ | ||
export const memoize = (func) => { | ||
// eslint-disable-next-line no-console | ||
console.log(`Creating cache for function '${func.name}'`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those console.log()
are probably not crucial for the functionality, and don't look good when running tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While on the test subject. Where did you get the idea to name the directory __test__
, when the rest is just test
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! You're right. I apply my own convention rather than yours... My apologize 🙏
I'm gonna fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some comments explaining what the algorithm does and how.
Hello again 👋
I added the memo algorithm inside the cache folder (unit tests included)
If that's okay for you, can you add the
hacktoberfest-accepted
mention? 🙏