@cubie-ai/tiny-ai - v0.0.14
    Preparing search index...

    Function toMap

    • Converts an array or object of values into a map using a key function. The key function is used to generate the keys for the map. The optional operation function is used to transform the values before adding them to the map.

      Type Parameters

      • T
      • R = T

      Parameters

      • values: Record<string, T> | T[]
      • key: (value: T) => string = ...
      • Optionalop: (value: T) => R

      Returns Record<string, R>