Skip to content

Pass index and original array in .filter #10

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

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

Conversation

ellell
Copy link
Contributor

@ellell ellell commented Nov 28, 2016

Review: @kesla
Type: Minor

Adds index and original array to callback parameters in .filter(), to be compatible with standard js array.filter.

@@ -125,6 +125,13 @@ test('filter()', t => {
t.deepEqual(actual, expected);
});

test('filter() unique values', t => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this describes a use case for using the index and originalArray properties, but not the actual functionality.

I think the test would be better (more descriptive) if the title at least was more generic. Might also make sense to create a simpler test.

Another idea would be to add a .unique method to immutable-array-methods!

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.

2 participants