4 ms·
What about _.flatten()? E.g. to flatten an array before find()? Just thought of 1-level flattening [].concat(...array). But it not that explicit. Also, array.f
by GreLI 11y ago
What about _.flatten()? E.g. to flatten an array before find()?
Just thought of 1-level flattening [].concat(...array). But it not that explicit. Also, array.find(i => i.foo == 'bar') isn't as readable as _.find(array, { foo: 'bar' }).