X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2Fat.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2Fat.js;h=cc361883543c1c06c60de633272202468f718197;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/at.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/at.js new file mode 100644 index 000000000..cc3618835 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/at.js @@ -0,0 +1,29 @@ +var baseAt = require('./_baseAt'), + baseFlatten = require('./_baseFlatten'), + rest = require('./rest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths of elements to pick, + * specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + * + * _.at(['a', 'b', 'c'], 0, 2); + * // => ['a', 'c'] + */ +var at = rest(function(object, paths) { + return baseAt(object, baseFlatten(paths)); +}); + +module.exports = at;