mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Update doc examples to ES2015.
This commit is contained in:
4
find.js
4
find.js
@@ -14,13 +14,13 @@ import findIndex from './findIndex.js';
|
||||
* @returns {*} Returns the matched element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* const users = [
|
||||
* { 'user': 'barney', 'age': 36, 'active': true },
|
||||
* { 'user': 'fred', 'age': 40, 'active': false },
|
||||
* { 'user': 'pebbles', 'age': 1, 'active': true }
|
||||
* ];
|
||||
*
|
||||
* find(users, function(o) { return o.age < 40; });
|
||||
* find(users, o => o.age < 40);
|
||||
* // => object for 'barney'
|
||||
*/
|
||||
const find = createFind(findIndex);
|
||||
|
||||
Reference in New Issue
Block a user