15 lines
382 B
JavaScript
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,
|
|
}),
|
|
};
|