Skip to main content
Module

x/ana_components/deps.ts>dMap

🅰️ UI library for Ana
Go to Latest
function dMap
import { dMap } from "https://deno.land/x/ana_components@v0.0.6/deps.ts";

This function emulates the behavior of Array.prototype.map() in Dictionaries. It calls a function passing each entry of the dictionary as an argument.

Parameters

dictionary: Dictionary<EntryType>

The dictionary to be mapped.

callback: (entry: EntryType, key?: string) => EntryType

The function that will map the entries of the dictionary.

Returns

A new dictionary with each entry mapped to the function.