source: node_modules/es-toolkit/dist/compat/array/flatMapDepth.js@ ba17441

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
RevLine 
[a762898]1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5const flatten = require('./flatten.js');
6const map = require('./map.js');
7const identity = require('../../function/identity.js');
8const iteratee = require('../util/iteratee.js');
9
10function 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
19exports.flatMapDepth = flatMapDepth;
Note: See TracBrowser for help on using the repository browser.