mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import arrayMap from './arrayMap';
|
||||
|
||||
/**
|
||||
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
||||
* array of `object` property values corresponding to the property names
|
||||
@@ -9,14 +11,9 @@
|
||||
* @returns {Object} Returns the array of property values.
|
||||
*/
|
||||
function baseValues(object, props) {
|
||||
var index = -1,
|
||||
length = props.length,
|
||||
result = Array(length);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = object[props[index]];
|
||||
}
|
||||
return result;
|
||||
return arrayMap(props, function(key) {
|
||||
return object[key];
|
||||
});
|
||||
}
|
||||
|
||||
export default baseValues;
|
||||
|
||||
Reference in New Issue
Block a user