1 var baseAt = require('../internal/baseAt'),
2 baseFlatten = require('../internal/baseFlatten'),
3 restParam = require('../function/restParam');
6 * Creates an array of elements corresponding to the given keys, or indexes,
7 * of `collection`. Keys may be specified as individual arguments or as arrays
12 * @category Collection
13 * @param {Array|Object|string} collection The collection to iterate over.
14 * @param {...(number|number[]|string|string[])} [props] The property names
15 * or indexes of elements to pick, specified individually or in arrays.
16 * @returns {Array} Returns the new array of picked elements.
19 * _.at(['a', 'b', 'c'], [0, 2]);
22 * _.at(['barney', 'fred', 'pebbles'], 0, 2);
23 * // => ['barney', 'pebbles']
25 var at = restParam(function(collection, props) {
26 return baseAt(collection, baseFlatten(props));