UNPKG

@pubby.club/sdk

Version:
19 lines (18 loc) 871 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.localStorage = exports.performance = void 0; var browserPerformance = new Function("try { return window.performance; } catch(e) { return undefined; }")(); var browserLocalstorage = new Function("try { return window.localStorage; } catch(e) { return undefined; }")(); exports.performance = browserPerformance !== null && browserPerformance !== void 0 ? browserPerformance : require('perf_hooks').performance; exports.localStorage = browserLocalstorage !== null && browserLocalstorage !== void 0 ? browserLocalstorage : { ___: new Map(), getItem: function (key) { return this.___.get(key); }, setItem: function (key, value) { return this.___.set(key, value); }, deleteItem: function (key, value) { return this.___.set(key, value); } };