• Creates a series object around a list of values that should be treated with order.

    Type Parameters

    • T

    Parameters

    • items: T[]
    • Optional toKey: ((item) => string | symbol)
        • (item): string | symbol
        • Parameters

          • item: T

          Returns string | symbol

    Returns {
        first: (() => T);
        last: (() => T);
        max: ((a, b) => T);
        min: ((a, b) => T);
        next: ((current, defaultValue?) => T);
        previous: ((current, defaultValue?) => T);
        spin: ((current, num) => T);
    }

    • first: (() => T)
        • (): T
        • Returns T

    • last: (() => T)
        • (): T
        • Returns T

    • max: ((a, b) => T)
        • (a, b): T
        • Parameters

          Returns T

    • min: ((a, b) => T)
        • (a, b): T
        • Parameters

          Returns T

    • next: ((current, defaultValue?) => T)
        • (current, defaultValue?): T
        • Parameters

          • current: T
          • Optional defaultValue: T

          Returns T

    • previous: ((current, defaultValue?) => T)
        • (current, defaultValue?): T
        • Parameters

          • current: T
          • Optional defaultValue: T

          Returns T

    • spin: ((current, num) => T)
        • (current, num): T
        • Parameters

          • current: T
          • num: number

          Returns T