UNPKG

@nepse-helper/core

Version:

A helper library for NEPSE

21 lines (20 loc) 420 B
export class Store { _state; constructor(initialValue) { this._state = initialValue; } get(key) { return this._state[key]; } set(newValues) { this._state = { ...this._state, ...newValues }; } } export const tokenStore = new Store({ accessToken: "", refreshToken: "", initialMagicNumbers: [], magicNumbers: [], magicNumber: 0, serverDay: 0, });