Use destructuring in code samples.

This commit is contained in:
John-David Dalton
2017-01-11 13:36:52 -08:00
parent d80077ed94
commit f5e7671fbc
18 changed files with 37 additions and 37 deletions

View File

@@ -14,9 +14,9 @@ import baseSortedIndexBy from './.internal/baseSortedIndexBy.js';
* into `array`.
* @example
*
* const objects = [{ 'x': 4 }, { 'x': 5 }];
* const objects = [{ 'n': 4 }, { 'n': 5 }];
*
* sortedIndexBy(objects, { 'x': 4 }, o => o.x);
* sortedIndexBy(objects, { 'n': 4 }, ({ n }) => n);
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {