source: imaps-frontend/node_modules/lodash-es/pick.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 627 bytes
RevLine 
[d565449]1import basePick from './_basePick.js';
2import flatRest from './_flatRest.js';
3
4/**
5 * Creates an object composed of the picked `object` properties.
6 *
7 * @static
8 * @since 0.1.0
9 * @memberOf _
10 * @category Object
11 * @param {Object} object The source object.
12 * @param {...(string|string[])} [paths] The property paths to pick.
13 * @returns {Object} Returns the new object.
14 * @example
15 *
16 * var object = { 'a': 1, 'b': '2', 'c': 3 };
17 *
18 * _.pick(object, ['a', 'c']);
19 * // => { 'a': 1, 'c': 3 }
20 */
21var pick = flatRest(function(object, paths) {
22 return object == null ? {} : basePick(object, paths);
23});
24
25export default pick;
Note: See TracBrowser for help on using the repository browser.