Test name | Executions per second |
---|---|
lodash | 1085444.2 Ops/sec |
native | 7118099.0 Ops/sec |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
var users = [
{ 'user': 'joey', 'age': 32 },
{ 'user': 'ross', 'age': 41 },
{ 'user': 'chandler', 'age': 39 }
]
_.find(users, ['user', 'ross'])
users.find((x) => x.user === 'ross')