UNPKG

@telstra/core

Version:
19 lines (18 loc) 429 B
import { MemoryStorage } from './MemoryStorage.js'; class Storage { static _instance; _storage; constructor() { this._storage = new MemoryStorage(); } static getInstance() { if (!Storage._instance) { Storage._instance = new Storage(); } return Storage._instance; } get() { return this._storage; } } export const storage = Storage.getInstance();