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

refactor to avoid code duplication. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

millermedeiros
Copy link

  • Abstract lambda logic so it doesn't need to do same check multiple times.
  • Abstract the prepend arguments logic into a separate method since it was being used everywhere.
  • Add safer check for Functional.lambda existence.
  • Reuse $.noop instead of creating a new function.

 - Abstract `lambda` logic so it doesn't need to do same check multiple times.
 - Abstract the *prepend arguments* logic into a separate method since it was being used everywhere.
 - Add safer check for `Functional.lambda` existence.
@millermedeiros
Copy link
Author

PS: I didn't tested my changes, edited the file live on GitHub - just found out about the plugin and saw that there was room for improvements on the source code.. - it might be useful in the future so that's why I decided to do the pull request. cheers.

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

Successfully merging this pull request may close these issues.

1 participant