@bytebury/sauce - v2.2.0
    Preparing search index...

    Function first

    • Returns the first thing in a list. If the value is a string, then it will return the first character.

      Type Parameters

      • T

      Parameters

      Returns T

      If an empty list is passed then this will return undefined.

      first("hello"); // "h"
      first([1, 2, 3]); // 1
    • Returns the first thing in a list. If the value is a string, then it will return the first character.

      Parameters

      • value: string

      Returns string

      If an empty list is passed then this will return undefined.

      first("hello"); // "h"
      first([1, 2, 3]); // 1