|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
592 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | const flatten = require('./flatten.js');
|
|---|
| 6 | const map = require('./map.js');
|
|---|
| 7 | const identity = require('../../function/identity.js');
|
|---|
| 8 | const iteratee = require('../util/iteratee.js');
|
|---|
| 9 |
|
|---|
| 10 | function flatMapDepth(collection, iteratee$1 = identity.identity, depth = 1) {
|
|---|
| 11 | if (collection == null) {
|
|---|
| 12 | return [];
|
|---|
| 13 | }
|
|---|
| 14 | const iterateeFn = iteratee.iteratee(iteratee$1);
|
|---|
| 15 | const mapped = map.map(collection, iterateeFn);
|
|---|
| 16 | return flatten.flatten(mapped, depth);
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | exports.flatMapDepth = flatMapDepth;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.