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, test, and document at #25

Closed
wants to merge 1 commit into from
Closed

Conversation

AlexVipond
Copy link
Contributor

For at, I decided to support both positive and negative indices, since negative indices are such a popular feature of Array.prototype.at.

When the index is positive, it uses find under the hood for optimal performance. When the index is negative, it basically works the same way as reverse—convert the whole iterator to an array, and fall back to Array.prototype.at under the hood.

@RobinMalfait
Copy link
Owner

Hey, thanks so much for this contribution! 🙏

I rebased the branch and made some adjustments in #30, but made sure to still include you as a contributor. I also made a recent change such that an insiders release is published so that you can already play with it:

  • npm install lazy-collections@insiders

@AlexVipond AlexVipond deleted the at branch April 21, 2023 00:30
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.

None yet

2 participants