index.js 1014 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  3. * Build: `lodash modern modularize exports="npm" -o ./`
  4. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  5. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  6. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7. * Available under MIT license <https://lodash.com/license>
  8. */
  9. /**
  10. * The base implementation of `_.values` and `_.valuesIn` which creates an
  11. * array of `object` property values corresponding to the property names
  12. * returned by `keysFunc`.
  13. *
  14. * @private
  15. * @param {Object} object The object to query.
  16. * @param {Array} props The property names to get values for.
  17. * @returns {Object} Returns the array of property values.
  18. */
  19. function baseValues(object, props) {
  20. var index = -1,
  21. length = props.length,
  22. result = Array(length);
  23. while (++index < length) {
  24. result[index] = object[props[index]];
  25. }
  26. return result;
  27. }
  28. module.exports = baseValues;