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

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

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

Creates an ordered array of the keys of this collection, and caches it internally. The array will only be reconstructed if an item is added to or removed from the collection, or if you change the length of the array itself. If you don't want this caching behavior, use [...collection.keys()] or Array.from(collection.keys()) instead.