We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fromIndex
includes and indexOf has fromIndex arguments which don't make sense.
includes
indexOf
In Array approach it is useful to have better performance. But in lazy approach doing iterum.drop(fromIndex).includes(...) is the same.
iterum.drop(fromIndex).includes(...)
The text was updated successfully, but these errors were encountered:
Notice that iterum.indexOf(n, fromIndex) does not returns the same that iterum.drop(fromIndex).indexOf(n).
iterum.indexOf(n, fromIndex)
iterum.drop(fromIndex).indexOf(n)
However it's easy to create an snippet which obtains the same:
const result1 = iterum.indexOf(n, fromIndex) const x = iterum.drop(fromIndex).indexOf(n) const result2 = x === -1 ? -1 : fromIndex + x // result1 === result2
Then, I'm also going to remove fromIndex of indexOf method.
Sorry, something went wrong.
I've noticed that lodash/fp has indexOfFrom function. I'm also going to implement this method
lodash/fp
indexOfFrom
remove fromIndex optional parameter from indexOf & includes #14 #16
870a8da
add indexOfFrom method #16
907a156
No branches or pull requests
includes
andindexOf
hasfromIndex
arguments which don't make sense.In Array approach it is useful to have better performance. But in lazy approach doing
iterum.drop(fromIndex).includes(...)
is the same.The text was updated successfully, but these errors were encountered: