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

x/revoltio/src/lib.ts>Collection#map

No-nonsense Revolt library for nodejs and deno.
Latest
method Collection.prototype.map
Re-export
import { Collection } from "https://deno.land/x/revoltio@v1.0.0/src/lib.ts";

Maps each item to another value into an array. Identical in behavior to Array.map().

Examples

collection.map(user => user.tag);

Parameters

fn: (
value: V,
key: K,
collection: this,
) => T

Function that produces an element of the new array, taking three arguments

Parameters

fn: (
this: This,
value: V,
key: K,
collection: this,
) => T
thisArg: This