Skip to content
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

API reference

Darko Kukovec edited this page Jun 24, 2017 · 1 revision

KeysStore

setItem

setItem(key: string, value: any): undefined

The setItem method receives two values - the key and the value that should be set. The method is not returning anything. The key will be an observable - no matter if the key already existed or is a new key.

getItem

getItem(key: string): any

The getItem method receives one argument - the key we want to access. It returns the value of the key.

removeItem

removeItem(key: string): undefined

The removeItem method receives one argument - the key we want to remove from the store. The return value is always undefined.

increaseItem

increaseItem(key: string, amount: number = 1): undefined

The increaseItem method will increase the given key by amount (default is 1). The return value is undefined.

decreaseItem

decreaseItem(key: string, amount: number = 1): undefined

The decreaseItem method will decrease the given key by amount (default is 1). The return value is undefined.

Interfaces

IDictionary

A basic key/value interface

IKeysStoreConstructor

An interface for the store constructor

IKeysStoreInstance

An interface for the store instance. This is the interface you'll want to use trough your application (if you're using TypeScript).

Clone this wiki locally