temporal-fns
    Preparing search index...

    Function closestIndexTo

    • Returns the index of the candidate whose distance to target is smallest, or -1 when candidates is empty. Ties resolve to the lowest index. All candidates must be the same Temporal type as target.

      Type Parameters

      Parameters

      • target: T
      • candidates: T[]

      Returns number