main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
641 bytes
|
Line | |
---|
1 | import baseSet from './_baseSet.js';
|
---|
2 | import baseZipObject from './_baseZipObject.js';
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * This method is like `_.zipObject` except that it supports property paths.
|
---|
6 | *
|
---|
7 | * @static
|
---|
8 | * @memberOf _
|
---|
9 | * @since 4.1.0
|
---|
10 | * @category Array
|
---|
11 | * @param {Array} [props=[]] The property identifiers.
|
---|
12 | * @param {Array} [values=[]] The property values.
|
---|
13 | * @returns {Object} Returns the new object.
|
---|
14 | * @example
|
---|
15 | *
|
---|
16 | * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
|
---|
17 | * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
|
---|
18 | */
|
---|
19 | function zipObjectDeep(props, values) {
|
---|
20 | return baseZipObject(props || [], values || [], baseSet);
|
---|
21 | }
|
---|
22 |
|
---|
23 | export default zipObjectDeep;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.