Special ships class for extended functionality

Hierarchy

Constructors

Properties

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

Methods

  • Get ship using everything

    Parameters

    • query: string

      basically anyting i guess

    Returns [] | Ship[]

  • Gets a ship by their Nationality + Name. This is to differentiate, for example: HMS Enterprise and USS Enterprise.

    Refer to the wiki for nation abbreviations.

    Example

    client.code('HMS Enterprise')
    // –> {wikiUrl: "https://azurlane.koumakan.jp/wiki/Enterprise_(Royal_Navy)"...}

    Parameters

    • shipCode: string

      Generally the ship's ${nationality} ${name}

    Returns undefined | Ship

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

    Parameters

    • predicate: ((value: Ship, index: number, array: Ship[]) => 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: Ship, index: number, array: Ship[]): unknown
        • Parameters

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

          Returns unknown

    Returns boolean

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

    Parameters

    • predicate: ((value: Ship, index: number, array: Ship[]) => 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: Ship, index: number, array: Ship[]): unknown
        • Parameters

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

          Returns unknown

    Returns Ship[]

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

    Parameters

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

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

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

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

          Returns void

    Returns void

  • Search fuse cache

    Parameters

    • name: string

      Any

    Returns FuseResult<Ship>[]

  • Get ship using name in any language or id. Returns an array if an exact match isn't found.

    Parameters

    • query: string

      Ship name in any language or ship id

    Returns Ship[]

  • Parameters

    • name: string
    • language: string = 'en'

    Returns string

  • Get ship by hull

    Parameters

    • hull: string

      Hull name

    Returns [] | Ship[]

  • Get by id

    Parameters

    • id: string

      String of number

    Returns undefined | Ship

  • 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: Ship, index: number, array: Ship[]) => 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: Ship, index: number, array: Ship[]): U
        • Parameters

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

          Returns U

    Returns U[]

  • Get ship by name

    Parameters

    • name: string

      Ship name

    • languages: Language[] = ...

      Language to search

    Returns [] | Ship[]

  • Get ship by nationality

    Parameters

    • nationality: string

      Nationality name

    Returns [] | Ship[]

  • Throws is query is undefined or an object or something – anything not a string.

    Parameters

    • query: unknown

    Returns string

  • Set the cache

    Parameters

    Returns void

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

    Parameters

    • predicate: ((value: Ship, index: number, array: Ship[]) => 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: Ship, index: number, array: Ship[]): unknown
        • Parameters

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

          Returns unknown

    Returns boolean

Generated using TypeDoc