Equivalent of _.without
See original GitHub issueHi,
Is there an elegant way to remove an item from an array in an immutable way without using underscore?
I want _.without([1,2,3],2)
to return [1,3]
.
The original array should remain unmodified.
I’d like to avoid using a syntax involving indexes, slice, splice or whatever because I never remember it and using _ is much simpler.
Is there any simple way with ES next?
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Without Synonyms & Antonyms
withoutpreposition. Synonyms: with no, wo, lacking, sans, -less, outwith · withoutpreposition. Unless, except (introducing a clause). Synonyms: -less, wo, ...
Read more >synonyms for without equal - Thesaurus.com
synonyms for without equal · peerless · unmatched · unparalleled · unrivaled · unsurpassed · alone · beyond compare · incomparable ...
Read more >81 Synonyms & Antonyms of EQUIVALENT - Merriam-Webster
Synonyms for EQUIVALENT: counterpart, equal, like, parallel, partner, fellow, rival, colleague; Antonyms of EQUIVALENT: other, different, unlike, ...
Read more >Synonyms for without | Similar, equivalent words for without ...
Synonyms for without. What words can replace the word “without”? Words which starts from letter “w” of 7 letters. The best online synonym...
Read more >What is another word for "without equal"? - WordHippo
What is another word for without equal? ; perfect · outstanding ; beyond compare · unequalled ; unmatched · unequaled ; unsurpassed ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
lol i think i’ll keep using lodash for now 😃
@slorber wouldn’t this work as wanted:
[1, 2, 3].without(2);
?Edit: Oh, I get it… You want to be able to do:
[1, 2, 3].without([1, 2]);
, right?