Skip to content

Instantly share code, notes, and snippets.

@DanShappir
Created November 6, 2019 12:22
Show Gist options
  • Save DanShappir/3a0915a1c53fe4ed1df840269064e0c5 to your computer and use it in GitHub Desktop.
Save DanShappir/3a0915a1c53fe4ed1df840269064e0c5 to your computer and use it in GitHub Desktop.
lodash chaining
const result2 = _(numbers)
.filter(v => v % 2 === 0) // retain only even numbers
.map(v => v + 1) // increase these numbers
.slice(0, 3) // get the first 3 items
.value();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment