import {Mappable} from '@serenity-js/core/lib/io/collections'
public interface | source

Mappable

Describes a collection providing a map-like interface.

Member Summary

Public Members
public abstract

map: function<U>(callback: (item?: Item, index?: number) => U): PromiseLike<U[]> | U[]

Applies a MappingFunction function to each element of a Mappable collection.

Public Members

public abstract map: function<U>(callback: (item?: Item, index?: number) => U): PromiseLike<U[]> | U[] source

Applies a MappingFunction function to each element of a Mappable collection.

The callback receives an item from the collection as the first argument and its index as the second argument.