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

x/denocordts/deps.ts>Collection#each

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

Identical to Map.forEach(), but returns the collection instead of undefined.

Examples

collection .each(user => console.log(user.username)) .filter(user => user.bot) .each(user => console.log(user.username));

Parameters

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

Function to execute for each element

Parameters

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