kollectionjs - v2.0.0
    Preparing search index...

    Function entriesOf

    • Creates a Sequence of [key, value] pairs from a plain object, equivalent to asSequence(Object.entries(obj)) but with entry-aware methods available (mapKeys, mapValues, toObject).

      Type Parameters

      • T extends object

        The object type.

      Parameters

      • obj: T

        The object whose own enumerable string-keyed entries are used.

      Returns Sequence<ObjectEntry<T>>

      entriesOf({ name: 'yoda', side: 'light' })
      .mapKeys(k => k.toUpperCase())
      .mapValues(v => v.toUpperCase())
      .toObject(); // { NAME: 'YODA', SIDE: 'LIGHT' }