Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/collection/src/Collection.ts>Collection#first

Utility data structure for Deno (Discord.js Collection).
Latest
method Collection.prototype.first
import { Collection } from "https://deno.land/x/collection@v1.0.1/src/Collection.ts";

Obtains the first value(s) in this collection.

Returns

V | undefined

A single value if no amount is provided or an array of values, starting from the end if amount is negative

Parameters

amount: number