Better HN
topnewbestaskshowjobs
Log inSign up

GreLI

1 karma · joined Jul 4, 2015 (11y ago) · 1 submissions

Submissions

comment 11y ago · link · parent

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' }).