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:
557 bytes
|
Line | |
---|
1 | import baseAt from './_baseAt.js';
|
---|
2 | import flatRest from './_flatRest.js';
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Creates an array of values corresponding to `paths` of `object`.
|
---|
6 | *
|
---|
7 | * @static
|
---|
8 | * @memberOf _
|
---|
9 | * @since 1.0.0
|
---|
10 | * @category Object
|
---|
11 | * @param {Object} object The object to iterate over.
|
---|
12 | * @param {...(string|string[])} [paths] The property paths to pick.
|
---|
13 | * @returns {Array} Returns the picked values.
|
---|
14 | * @example
|
---|
15 | *
|
---|
16 | * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
|
---|
17 | *
|
---|
18 | * _.at(object, ['a[0].b.c', 'a[1]']);
|
---|
19 | * // => [3, 4]
|
---|
20 | */
|
---|
21 | var at = flatRest(baseAt);
|
---|
22 |
|
---|
23 | export default at;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.