MCPcopy Index your code
hub / github.com/immutable-js/immutable-js / flatMapFactory

Function flatMapFactory

src/Operations.js:779–785  ·  view source on GitHub ↗
(collection, mapper, context)

Source from the content-addressed store, hash-verified

777}
778
779export function flatMapFactory(collection, mapper, context) {
780 const coerce = collectionClass(collection);
781 return collection
782 .toSeq()
783 .map((v, k) => coerce(mapper.call(context, v, k, collection)))
784 .flatten(true);
785}
786
787export function interposeFactory(collection, separator) {
788 const interposedSequence = makeSequence(collection);

Callers 1

flatMapFunction · 0.90

Calls 4

collectionClassFunction · 0.85
flattenMethod · 0.80
mapMethod · 0.65
toSeqMethod · 0.65

Tested by

no test coverage detected