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 nth function #47

Closed
ppeeou opened this issue Dec 7, 2021 · 0 comments · Fixed by #50
Closed

Add nth function #47

ppeeou opened this issue Dec 7, 2021 · 0 comments · Fixed by #50
Assignees
Labels
enhancement New feature or request

Comments

@ppeeou
Copy link
Member

ppeeou commented Dec 7, 2021

Suggestion

⭐ Suggestion

Returns the nth element of the given Iterable/AsyncIterable

💻 Use Cases

nth(2, [1,2,3,4]); // 1
nth(5, [1,2,3,4]); // undefined
nth(2, ['name', 'gender', 'age']); // 'age'
nth(3, ['name', 'gender', 'age']); // undefined
nth(2, 'abcdefg'); // 'b'
nth(10, 'abcdefg'); // undefined
@ppeeou ppeeou added enhancement New feature or request v0.3 labels Dec 7, 2021
This was referenced Dec 7, 2021
@ppeeou ppeeou closed this as completed in #50 Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant