Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected _response

_response: JsonApiResponse

Holds a reference to the response object

Protected _state

_state: PlainObject<any>

The registered translations on this instance

Accessors

jsonElementType

response

Methods

destroy

  • destroy(): void

get

  • get(key: string | string[], fallback?: any): any
  • Returns the value of the initial state

    Parameters

    • key: string | string[]
    • Optional fallback: any

    Returns any

getAll

  • getAll(): PlainObject<any>
  • Returns all key and value pairs that are currently inside the state

    Returns PlainObject<any>

has

  • has(key: string | string[]): boolean
  • Returns true if a certain key exists in the state

    Parameters

    • key: string | string[]

    Returns boolean

hasValue

  • hasValue(key: string | string[], includeZero?: boolean): boolean
  • Similar to "has" but also checks if the value on a key is "empty". If the value is considered empty this method will return false Empty values are: NULL, undefined, 0, "", " ", {}, [] and empty Maps and Sets

    Parameters

    • key: string | string[]
    • Optional includeZero: boolean

      By default zero (0) is not seen as "empty" if you set this to true, it will be, tho

    Returns boolean

Generated using TypeDoc