@adviser/cement - v0.0.0
    Preparing search index...

    Function toSortedArray

    • Converts an object to a sorted array of [key, value] tuples.

      Type Parameters

      • T

        The input object type

      Parameters

      • Optionalset: T

        The object to convert

      • OptionaltouchFn: TouchFn

        Optional function to transform values during sorting

      Returns [string, unknown][]

      Array of [key, value] tuples sorted by key

      const sorted = toSortedArray({ z: 3, a: 1, m: 2 });
      // [['a', 1], ['m', 2], ['z', 3]]