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

x/denocordts/deps.ts>Collection#flatMap

An Object Oriented Discord API wrapper for Deno.
Latest
method Collection.prototype.flatMap
import { Collection } from "https://deno.land/x/denocordts@1.2.0/deps.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