Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/fromPairs

Index

References

Functions

References

Renames and re-exports fromPairs

Functions

  • Creates a new object from a list key-value pairs. If a key appears in multiple pairs, the rightmost pair is included in the object.

    example
     fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3}
    

    Type parameters

    • K: string | number | symbol

    • V

    Parameters

    Returns Record<K, V>

    The object made by pairing up keys and values.

Generated using TypeDoc