X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fpick.js;fp=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fpick.js;h=44745755f746197e161bce86bfbf6439f6416e2c;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/pick.js b/node_modules/grunt-legacy-util/node_modules/lodash/pick.js new file mode 100644 index 000000000..44745755f --- /dev/null +++ b/node_modules/grunt-legacy-util/node_modules/lodash/pick.js @@ -0,0 +1,26 @@ +var baseFlatten = require('./_baseFlatten'), + basePick = require('./_basePick'), + rest = require('./rest'); + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to pick, specified + * individually or in arrays. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = rest(function(object, props) { + return object == null ? {} : basePick(object, baseFlatten(props)); +}); + +module.exports = pick;