mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Update fred ages in doc examples. [ci skip]
This commit is contained in:
16
lodash.js
16
lodash.js
@@ -8012,8 +8012,8 @@
|
||||
* // => false
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'active': false },
|
||||
* { 'user': 'fred', 'active': false }
|
||||
* { 'user': 'barney', 'age': 36, 'active': false },
|
||||
* { 'user': 'fred', 'age': 40, 'active': false }
|
||||
* ];
|
||||
*
|
||||
* // The `_.matches` iteratee shorthand.
|
||||
@@ -8499,13 +8499,13 @@
|
||||
* var users = [
|
||||
* { 'user': 'fred', 'age': 48 },
|
||||
* { 'user': 'barney', 'age': 34 },
|
||||
* { 'user': 'fred', 'age': 42 },
|
||||
* { 'user': 'fred', 'age': 40 },
|
||||
* { 'user': 'barney', 'age': 36 }
|
||||
* ];
|
||||
*
|
||||
* // Sort by `user` in ascending order and by `age` in descending order.
|
||||
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
||||
*/
|
||||
function orderBy(collection, iteratees, orders, guard) {
|
||||
if (collection == null) {
|
||||
@@ -8855,20 +8855,20 @@
|
||||
* var users = [
|
||||
* { 'user': 'fred', 'age': 48 },
|
||||
* { 'user': 'barney', 'age': 36 },
|
||||
* { 'user': 'fred', 'age': 42 },
|
||||
* { 'user': 'fred', 'age': 40 },
|
||||
* { 'user': 'barney', 'age': 34 }
|
||||
* ];
|
||||
*
|
||||
* _.sortBy(users, function(o) { return o.user; });
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
||||
*
|
||||
* _.sortBy(users, ['user', 'age']);
|
||||
* // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
|
||||
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
|
||||
*
|
||||
* _.sortBy(users, 'user', function(o) {
|
||||
* return Math.floor(o.age / 10);
|
||||
* });
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
||||
*/
|
||||
var sortBy = rest(function(collection, iteratees) {
|
||||
if (collection == null) {
|
||||
|
||||
Reference in New Issue
Block a user