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

x/denocordts/deps.ts>Collection#map

An Object Oriented Discord API wrapper for Deno.
Latest
method Collection.prototype.map
import { Collection } from "https://deno.land/x/denocordts@1.2.0/deps.ts";

Maps each item to another value into an array. Identical in behavior to Array.map().

Examples

collection.map(user => user.tag);

Parameters

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

Function that produces an element of the new array, taking three arguments

Parameters

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