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

x/collection/src/Collection.ts>default#lastKey

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

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

Returns

K | undefined

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

Parameters

amount: number