@daysnap/utils
Version:
22 lines (15 loc) • 495 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});
var _chunk4YOKT62Rcjs = require('./chunk-4YOKT62R.cjs');
// src/storage/index.ts
var getStorage = (type) => {
let instance = null;
return () => {
if (!instance) {
instance = _chunk4YOKT62Rcjs.factory.call(void 0, type);
}
return instance;
};
};
var getCache = getStorage("sessionStorage");
var getLocal = getStorage("localStorage");
exports.getCache = getCache; exports.getLocal = getLocal;