Type Parameters

Constructors

Properties

S: E

Start keys and values passed in via constructor.

entries: Map<any, any> = ...

Map of Key Value pair entries containing values store in this store.

subjects: Map<any, ReplaySubject<any>> = ...

Map of replay subject id to ReplaySubject instance.

Methods

  • Clear all entries.

    Note that this will call delete for on all keys defined which also also unsubscribes and deletes all the sbujects.

    Returns void

  • Returns the number of key value pairs contained.

    Returns number

    the number of entries in the store.

  • Deletes both the value entry and the corresponding ReplaySubject. Will unsubscribe the ReplaySubject prior to deleting it, severing communication with corresponding Observables.

    Parameters

    • key: any

    Returns void

  • Check whether a value exists.

    Parameters

    • key: any

    Returns boolean

    True if the entry exists ( Is not null or undefined ) and false otherwise.

  • Indicates whether the store is empty.

    Returns boolean

    true if the store is empty, false otherwise.

  • Observe changes to the values.

    Parameters

    • key: any

    Returns undefined | Observable<any>

    An Observable of the value

  • Set create a key value pair entry and creates a corresponding replay subject instance that will be used to broadcast updates.

    Parameters

    • key: ObsValueReset

      The key identifying the value

    • value: any

      The value

    Returns void

  • Update a value and notify subscribers.

    Parameters

    • key: any
    • value: any

    Returns void

  • Reset the state of the OStore to the values or reset provided in the constructor OStoreStart instance.

    Returns void

  • Retrieve a snapshot of the value.

    Parameters

    • key: any

    Returns any

    A snapshot of the value corresponding to the key.

Generated using TypeDoc