Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserStore

Stores data.

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new UserStore(category?: string): UserStore
  • Initializes a new instance of that class.

    Parameters

    • Optional category: string

    Returns UserStore

Properties

Optional category

category: string

file

file: string

The file that stores the data.

Static Private _USER_QUEUE

_USER_QUEUE: PQueue<PriorityQueue, DefaultAddOptions> = ego_helpers.createQueue()

Methods

get

  • get<TValue, TDefault>(key: any, defaultValue?: TDefault): TValue | TDefault
  • Tries to return a value from the store.

    Type parameters

    • TValue

    • TDefault

    Parameters

    • key: any
    • Optional defaultValue: TDefault

    Returns TValue | TDefault

    The read value or the default value.

Protected getValue

  • getValue(key: string, valueToReturn: BoxedValue<any>): void
  • inheritdoc

    Parameters

    Returns void

set

  • set(key: any, value: any): Promise<boolean>
  • Tries set a value in the store.

    Parameters

    • key: any
    • value: any

    Returns Promise<boolean>

    The promise with the value that indicates if operation was successfull or not.

Protected setValue

  • setValue(key: string, value: any, succeeded: BoxedValue<boolean>): Promise<void>
  • inheritdoc

    Parameters

    • key: string
    • value: any
    • succeeded: BoxedValue<boolean>

    Returns Promise<void>

Generated using TypeDoc