Module

utils/tomap

@ckeditor/ckeditor5-utils/src/tomap

module

Filtering

Functions

  • toMap( data ) → Map

    Transforms object or iterable to map. Iterable needs to be in the format acceptable by the Map constructor.

    map = toMap( { 'foo': 1, 'bar': 2 } );
    map = toMap( [ [ 'foo', 1 ], [ 'bar', 2 ] ] );
    map = toMap( anotherMap );

    Parameters

    data : Object | Iterable

    Object or iterable to transform.

    Returns

    Map

    Map created from data.