mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars` such that it finds a few instances in our code base that it did not find previously (fixed in previous commits readying this for landing). PR-URL: https://github.com/nodejs/node/pull/7601 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
24 lines
583 B
JavaScript
24 lines
583 B
JavaScript
var get = require('./get');
|
|
|
|
/**
|
|
* The base implementation of `_.at` without support for individual paths.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {string[]} paths The property paths of elements to pick.
|
|
* @returns {Array} Returns the picked elements.
|
|
*/
|
|
function baseAt(object, paths) {
|
|
var index = -1,
|
|
isNil = object == null,
|
|
length = paths.length,
|
|
result = Array(length);
|
|
|
|
while (++index < length) {
|
|
result[index] = isNil ? undefined : get(object, paths[index]);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseAt;
|