Module

utils/objecttomap

@ckeditor/ckeditor5-utils/src/objecttomap

module

Filtering

Functions

  • objectToMap( obj ) → Map

    Transforms object to map.

    const map = objectToMap( { 'foo': 1, 'bar': 2 } );
    map.get( 'foo' ); // 1
    

    Note: For mixed data (Object or Iterable) there's a dedicated toMap function.

    Parameters

    obj : Object

    Object to transform.

    Returns

    Map

    Map created from object.