Skip to content
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

DRY / KISS / YAGNI rules #7

Open
mahammad-mostafa opened this issue Jul 18, 2023 · 0 comments
Open

DRY / KISS / YAGNI rules #7

mahammad-mostafa opened this issue Jul 18, 2023 · 0 comments

Comments

@mahammad-mostafa
Copy link
Owner

✅ Very good use of destructuring & arrow functions in ES6 to adhere with KISS principle.
✅ Good limiting functions to have a single responsibility.

❓ No invalid output handling from searchIndex function leading to repeated conditions in several functions.
🔍 searchIndex = (index) => this.items.findIndex((item) => Task.compareTask(item, index)).
💡 Use short-circuit evaluation to always return a false value incase of invalid output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant