|
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:
461 bytes
|
| Line | |
|---|
| 1 | import { flatten } from './flatten.mjs';
|
|---|
| 2 | import { map } from './map.mjs';
|
|---|
| 3 | import { identity } from '../../function/identity.mjs';
|
|---|
| 4 | import { iteratee } from '../util/iteratee.mjs';
|
|---|
| 5 |
|
|---|
| 6 | function flatMapDepth(collection, iteratee$1 = identity, depth = 1) {
|
|---|
| 7 | if (collection == null) {
|
|---|
| 8 | return [];
|
|---|
| 9 | }
|
|---|
| 10 | const iterateeFn = iteratee(iteratee$1);
|
|---|
| 11 | const mapped = map(collection, iterateeFn);
|
|---|
| 12 | return flatten(mapped, depth);
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | export { flatMapDepth };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.