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

Add last method #41

Merged
merged 2 commits into from
Oct 24, 2019
Merged

Add last method #41

merged 2 commits into from
Oct 24, 2019

Conversation

vufly
Copy link
Contributor

@vufly vufly commented Oct 24, 2019

I want to resolve #38

Copy link
Member

@marcuspoehls marcuspoehls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vund-vn Hey Vu, thank you for the PR! Your implementation looks sweet, good job! I’m just requesting a minor refinement: adding an empty line befor the return statement.


if (typeof callback === 'function') {
const mapped = await this.filter(callback)
return mapped[mapped.length - 1]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add an empty line before the return statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean empty line before every return statement?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty line here:

Suggested change
return mapped[mapped.length - 1]
return mapped[mapped.length - 1]

@marcuspoehls
Copy link
Member

@vund-vn Thank you! Merged :)

@marcuspoehls marcuspoehls merged commit 66f31bd into supercharge:master Oct 24, 2019
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.

Add "last" method
2 participants