(value)
| 1579 | return _.shuffle(obj).slice(0, Math.max(0, n)); |
| 1580 | }; |
| 1581 | var lookupIterator = function(value) { |
| 1582 | if (value == null) return _.identity; |
| 1583 | if (_.isFunction(value)) return value; |
| 1584 | return _.property(value); |
| 1585 | }; |
| 1586 | _.sortBy = function(obj, iterator, context) { |
| 1587 | iterator = lookupIterator(iterator); |
| 1588 | return _.pluck(_.map(obj, function(value, index, list) { |
no outgoing calls
no test coverage detected