Function toMap

  • Creates a map from the own entries of an object.

    Since

    1.0.0

    See

    toMapBy

    Returns

    Map created from the object.

    Example

    toMap({a: 1, b: 4, c: 5})
    // => Map{"a": 1, "b": 4, "c": 5}

    Type Parameters

    • TValue

    Parameters

    • object: Record<PropertyKey, TValue> | ArrayLike<TValue>

      Object to use.

    Returns Map<string, TValue>

Generated using TypeDoc