Skip to main content
Module

x/bettermap/mod.ts>BetterMap#array

An extension of the Map class with more Array-like features.
Latest
method BetterMap.prototype.array
import { BetterMap } from "https://deno.land/x/bettermap@v1.3.0/mod.ts";

Convert the map into an array of values / keys

const map = new BetterMap<string, number>("People");
map.set("Doraemon", 10);
map.set("Dora", 28);
console.log(map.array());

Returns

V[]

Array of items in the map

Parameters

keys: boolean