PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
inquirer
/
node_modules
/
lodash
/
array
var isArray = require('../lang/isArray'); /** * The inverse of `_.pairs`; this method returns an object composed from arrays * of property names and values. Provide either a single two dimensional array, * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names * and one of corresponding values. * * @static * @memberOf _ * @alias object * @category Array * @param {Array} props The property names. * @param {Array} [values=[]] The property values. * @returns {Object} Returns the new object. * @example * * _.zipObject([['fred', 30], ['barney', 40]]); * // => { 'fred': 30, 'barney': 40 } * * _.zipObject(['fred', 'barney'], [30, 40]); * // => { 'fred': 30, 'barney': 40 } */ function zipObject(props, values) { var index = -1, length = props ? props.length : 0, result = {}; if (length && !values && !isArray(props[0])) { values = []; } while (++index < length) { var key = props[index]; if (values) { result[key] = values[index]; } else if (key) { result[key[0]] = key[1]; } } return result; } module.exports = zipObject;
[-] compact.js
[edit]
[-] sortedLastIndex.js
[edit]
[-] union.js
[edit]
[-] intersection.js
[edit]
[-] dropRightWhile.js
[edit]
[-] unzipWith.js
[edit]
[+]
..
[-] unique.js
[edit]
[-] dropRight.js
[edit]
[-] takeRight.js
[edit]
[-] drop.js
[edit]
[-] unzip.js
[edit]
[-] tail.js
[edit]
[-] flatten.js
[edit]
[-] lastIndexOf.js
[edit]
[-] dropWhile.js
[edit]
[-] object.js
[edit]
[-] findLastIndex.js
[edit]
[-] flattenDeep.js
[edit]
[-] take.js
[edit]
[-] rest.js
[edit]
[-] head.js
[edit]
[-] pullAt.js
[edit]
[-] first.js
[edit]
[-] without.js
[edit]
[-] uniq.js
[edit]
[-] zip.js
[edit]
[-] indexOf.js
[edit]
[-] slice.js
[edit]
[-] remove.js
[edit]
[-] zipObject.js
[edit]
[-] last.js
[edit]
[-] findIndex.js
[edit]
[-] fill.js
[edit]
[-] takeWhile.js
[edit]
[-] initial.js
[edit]
[-] pull.js
[edit]
[-] takeRightWhile.js
[edit]
[-] difference.js
[edit]
[-] zipWith.js
[edit]
[-] xor.js
[edit]
[-] chunk.js
[edit]
[-] sortedIndex.js
[edit]