Skip to main content
Module

x/lunchbox/src/utils.ts>rMap

Component Library 🍱 for Deno πŸ¦• Fresh πŸ‹
Latest
function rMap
import { rMap } from "https://deno.land/x/lunchbox@v0.3.15/src/utils.ts";

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

Parameters

record: Record<string, T>

The record to be mapped.

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

The function that will map the entries of the record.

Returns

Record<string, T>

A new cord with each entry mapped to the function.