@daysnap/utils
Version:
22 lines (19 loc) • 355 B
JavaScript
import {
factory
} from "./chunk-M6B3UGFI.js";
// src/storage/index.ts
var getStorage = (type) => {
let instance = null;
return () => {
if (!instance) {
instance = factory(type);
}
return instance;
};
};
var getCache = getStorage("sessionStorage");
var getLocal = getStorage("localStorage");
export {
getCache,
getLocal
};