Files
lodash/at.js
John-David Dalton 7402021739 Bump to v4.17.0.
2016-11-13 22:49:46 -08:00

24 lines
583 B
JavaScript

define(['./_baseAt', './_flatRest'], function(baseAt, flatRest) {
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Array} Returns the picked values.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
var at = flatRest(baseAt);
return at;
});