Options
All
  • Public
  • Public/Protected
  • All
Menu

Module store

Interacting with the browser storage has never been this bearable.

Get objects from the storage which update automatically when their stored version does and likewise update the stored version by simply changing the value of a property.

Index

Type aliases

StoreElementProxy

StoreElementProxy: StoreElement<T> & T

A StoreElement that has been wrapped with StoreElementTraps. This makes it so you can access all the attributes from the object while still having access to the benefits of a StoreElement.

Note that all properties of the object which are themselves objects will be a store element proxy themselves.

Variables

Const STATIC_STORE

STATIC_STORE: Store = new Store()

Global version of Store. It doesn't break anything if you don't use this instance, but there are several performance benefits if you do use it.

Functions

isPrimitive

  • isPrimitive(value: any): boolean
  • Check whether something is an object or a primitive value

    Parameters

    • value: any

    Returns boolean

prepareStoreElement

  • Return an object with non-primitve values replaced by StoreElements.

    Type parameters

    Parameters

    Returns any

Generated using TypeDoc