Skip to content

Instantly share code, notes, and snippets.

@boo1ean
Created August 24, 2017 18:07

Revisions

  1. boo1ean created this gist Aug 24, 2017.
    20 changes: 20 additions & 0 deletions 1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    const cars = [
    {
    title: 'Opel',
    power: 100,
    },
    {
    title: 'Audi',
    power: 200,
    },
    {
    title: 'Mazda',
    power: 100,
    },
    ]

    const title = _.chain(cars)
    .filter(car => car.power > 100)
    .head()
    .pick('title')
    .value()