dotfiles/.vscode/extensions/vscodevim.vim-0.1.10/node_modules/lodash/at.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

26 lines
685 B
JavaScript

var baseAt = require('./_baseAt'),
baseFlatten = require('./_baseFlatten'),
baseRest = require('./_baseRest');
/**
* 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 of elements 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 = baseRest(function(object, paths) {
return baseAt(object, baseFlatten(paths, 1));
});
module.exports = at;