Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ana_utils/src/dictionary.ts>dMap

🅰️ Utility functions for Ana
Go to Latest
function dMap
import { dMap } from "https://deno.land/x/ana_utils@v0.0.1/src/dictionary.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.