Created
September 23, 2018 07:08
-
-
Save minedun6/b56301003595d9f0a76d2099741dc442 to your computer and use it in GitHub Desktop.
Remember, chaining is a thing in lodash. Just tag a .value() on the end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getAllActivePostsIds(postsIds) { | |
return _(posts) | |
.filter(post => post.is_active) | |
.map('id') | |
.value() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment