2 * The inverse of `_.toPairs`; this method returns an object composed
3 * from key-value `pairs`.
9 * @param {Array} pairs The key-value pairs.
10 * @returns {Object} Returns the new object.
13 * _.fromPairs([['a', 1], ['b', 2]]);
14 * // => { 'a': 1, 'b': 2 }
16 function fromPairs(pairs) {
18 length = pairs == null ? 0 : pairs.length,
21 while (++index < length) {
22 var pair = pairs[index];
23 result[pair[0]] = pair[1];
28 module.exports = fromPairs;