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

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

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

Obtains the last value(s) in this collection. This relies on Collection#array, and thus the caching mechanism applies here as well.

Returns

V | undefined

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

Parameters

amount: number