Bump to v4.1.0.

This commit is contained in:
John-David Dalton
2016-01-28 01:19:04 -08:00
parent 7af5d55f22
commit 466c67a8b6
438 changed files with 1053 additions and 896 deletions

View File

@@ -1,4 +1,5 @@
import baseSet from './internal/baseSet';
import assignValue from './_assignValue';
import baseZipObject from './_baseZipObject';
/**
* This method is like `_.fromPairs` except that it accepts two arrays,
@@ -12,19 +13,11 @@ import baseSet from './internal/baseSet';
* @returns {Object} Returns the new object.
* @example
*
* _.zipObject(['fred', 'barney'], [30, 40]);
* // => { 'fred': 30, 'barney': 40 }
* _.zipObject(['a', 'b'], [1, 2]);
* // => { 'a': 1, 'b': 2 }
*/
function zipObject(props, values) {
var index = -1,
length = props ? props.length : 0,
valsLength = values ? values.length : 0,
result = {};
while (++index < length) {
baseSet(result, props[index], index < valsLength ? values[index] : undefined);
}
return result;
return baseZipObject(props || [], values || [], assignValue);
}
export default zipObject;