|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
569 bytes
|
| Line | |
|---|
| 1 | var get = require('./get');
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * The base implementation of `_.at` without support for individual paths.
|
|---|
| 5 | *
|
|---|
| 6 | * @private
|
|---|
| 7 | * @param {Object} object The object to iterate over.
|
|---|
| 8 | * @param {string[]} paths The property paths to pick.
|
|---|
| 9 | * @returns {Array} Returns the picked elements.
|
|---|
| 10 | */
|
|---|
| 11 | function baseAt(object, paths) {
|
|---|
| 12 | var index = -1,
|
|---|
| 13 | length = paths.length,
|
|---|
| 14 | result = Array(length),
|
|---|
| 15 | skip = object == null;
|
|---|
| 16 |
|
|---|
| 17 | while (++index < length) {
|
|---|
| 18 | result[index] = skip ? undefined : get(object, paths[index]);
|
|---|
| 19 | }
|
|---|
| 20 | return result;
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | module.exports = baseAt;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.