Sha256: 0af44ba52fdb2c38eb15d7bb1793cc4a4f859f1296c5965333d631c438c39d6f

Contents?: true

Size: 552 Bytes

Versions: 26

Compression:

Stored size: 552 Bytes

Contents

var arrayReduce = require('./_arrayReduce');

/**
 * The base implementation of `_.pick` without support for individual
 * property identifiers.
 *
 * @private
 * @param {Object} object The source object.
 * @param {string[]} props The property identifiers to pick.
 * @returns {Object} Returns the new object.
 */
function basePick(object, props) {
  object = Object(object);
  return arrayReduce(props, function(result, key) {
    if (key in object) {
      result[key] = object[key];
    }
    return result;
  }, {});
}

module.exports = basePick;

Version data entries

26 entries across 4 versions & 2 rubygems

Version Path
babel-schmooze-sprockets-0.1.1 node_modules/babel-register/node_modules/lodash/_basePick.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-template/node_modules/lodash/_basePick.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-plugin-transform-es2015-function-name/node_modules/lodash/_basePick.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-generator/node_modules/lodash/_basePick.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-helper-call-delegate/node_modules/lodash/_basePick.js
babel-schmooze-sprockets-0.1.1 node_modules/babel-helper-define-map/node_modules/lodash/_basePick.js