Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/revoltio/src/lib.ts>Collection#flatMap

No-nonsense Revolt library for nodejs and deno.
Latest
method Collection.prototype.flatMap
Re-export
import { Collection } from "https://deno.land/x/revoltio@v1.0.0/src/lib.ts";

Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to Array.flatMap().

Examples

collection.flatMap(guild => guild.members.cache);

Parameters

fn: (
value: V,
key: K,
collection: this,
) => Collection<K, T>

Function that produces a new Collection

Parameters

fn: (
this: This,
value: V,
key: K,
collection: this,
) => Collection<K, T>
thisArg: This