UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

21 lines (20 loc) 422 B
class LocalStorage { name; constructor(name) { this.get = this.get.bind(this); this.set = this.set.bind(this); this.name = name; } get() { const str = window.localStorage.getItem(this.name); return JSON.parse(str); } set(obj) { const str = JSON.stringify(obj); return window.localStorage.setItem(this.name, str); } } export { LocalStorage }; //# sourceMappingURL=storage.js.map