jrshikoku/storageControl.js
2023-01-28 08:49:19 +09:00

15 lines
382 B
JavaScript

import storage from "./storageConfig.js";
export const AS = {
getItem: (key) => storage.load({ key }),
setItem: (key, data) =>
storage.save({
key, // Note: Do not use underscore("_") in key!
data,
// if expires not specified, the defaultExpires will be applied instead.
// if set to null, then it will never expire.
expires: null,
}),
};