source: imaps-frontend/node_modules/lodash-es/zipObject.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 662 bytes
Line 
1import assignValue from './_assignValue.js';
2import baseZipObject from './_baseZipObject.js';
3
4/**
5 * This method is like `_.fromPairs` except that it accepts two arrays,
6 * one of property identifiers and one of corresponding values.
7 *
8 * @static
9 * @memberOf _
10 * @since 0.4.0
11 * @category Array
12 * @param {Array} [props=[]] The property identifiers.
13 * @param {Array} [values=[]] The property values.
14 * @returns {Object} Returns the new object.
15 * @example
16 *
17 * _.zipObject(['a', 'b'], [1, 2]);
18 * // => { 'a': 1, 'b': 2 }
19 */
20function zipObject(props, values) {
21 return baseZipObject(props || [], values || [], assignValue);
22}
23
24export default zipObject;
Note: See TracBrowser for help on using the repository browser.