source: node_modules/es-toolkit/dist/compat/array/flatMapDepth.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 461 bytes
Line 
1import { flatten } from './flatten.mjs';
2import { map } from './map.mjs';
3import { identity } from '../../function/identity.mjs';
4import { iteratee } from '../util/iteratee.mjs';
5
6function 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
15export { flatMapDepth };
Note: See TracBrowser for help on using the repository browser.