-
Notifications
You must be signed in to change notification settings
8000
- Fork 7.1k
_.replace(collection, match, new) #1022
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
Comments
_.replace(collection, match, new)
Let's keep it simple with the chaining string sugar for now. |
Roger. |
BTW I'm really digging your enthusiasm! |
Thanks for you encouraging words! |
@jdalton I'm looking for this kind for this particular function right now actually. Did this function ever get merged? I read through a bunch of issues and commits but didn't find anything.
|
@michaeljcalkins
Nope, I opted to keep things simple and rely only on the chaining sugar for now. |
Immutable |
@jfmengels thanks, I voted. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Before adding the
replace
onStringWrapper
in #1016, I thought about addingreplace
:Replace matches in
collection
withnew
match
is a normal[predicate=_.identity]
new
can be either:Why not just a
_.map
?_.replace([1, null, 3], _.isNull, 42)
looks really intuitive. TheisNull
can be any function you built to validate your data.The text was updated successfully, but these errors were encountered: