The Main API class

Type Parameters

  • T

Hierarchy

Constructors

Properties

Methods

Constructors

  • Constructor

    Type Parameters

    • T

    Parameters

    • client: AzurAPI

      AzurAPI instance

    • Optional keys: string[]

      Arrays of keys to pass on to fuse

    Returns default<T>

Properties

client: AzurAPI
fuse?: Fuse<T>
raw: T[]

Methods

  • Determines whether all the members of an array satisfy the specified test

    Parameters

    • predicate: ((value: T, index: number, array: T[]) => unknown)

      A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

        • (value: T, index: number, array: T[]): unknown
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns unknown

    Returns boolean

  • Returns the elements of an array that meet the condition specified in a callback function.

    Parameters

    • predicate: ((value: T, index: number, array: T[]) => unknown)

      A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

        • (value: T, index: number, array: T[]): unknown
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns unknown

    Returns T[]

  • Performs the specified action for each element in an array.

    Parameters

    • callbackfn: ((value: T, index: number, array: T[]) => void)

      A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

        • (value: T, index: number, array: T[]): void
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns void

    Returns void

  • Search fuse cache

    Parameters

    • name: string

      Any

    Returns FuseResult<T>[]

  • Get by any

    Returns

    Array

    Parameters

    • query: string

      Any

    Returns T | T[]

  • Calls a defined callback function on each element of an array, and returns an array that contains the results.

    Type Parameters

    • U

    Parameters

    • callbackfn: ((value: T, index: number, array: T[]) => U)

      A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

        • (value: T, index: number, array: T[]): U
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns U

    Returns U[]

  • Set the cache

    Parameters

    • raw: T[]

      Array

    Returns void

  • Determines whether the specified callback function returns true for any element of an array.

    Parameters

    • predicate: ((value: T, index: number, array: T[]) => unknown)

      A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.

        • (value: T, index: number, array: T[]): unknown
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns unknown

    Returns boolean

Generated using TypeDoc