Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
559 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var baseAt = require('./_baseAt'),
|
---|
| 2 | flatRest = require('./_flatRest');
|
---|
| 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 | module.exports = at;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.