mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
24 lines
495 B
JavaScript
24 lines
495 B
JavaScript
const { window } = global;
|
|
|
|
const local = {
|
|
clear: () => {
|
|
const { localStorage } = window;
|
|
|
|
localStorage.clear();
|
|
},
|
|
getItem: (itemName) => {
|
|
const { localStorage } = window;
|
|
|
|
return localStorage.getItem(`KOLIDE::${itemName}`);
|
|
},
|
|
setItem: (itemName, value) => {
|
|
const { localStorage } = window;
|
|
|
|
return localStorage.setItem(`KOLIDE::${itemName}`, value);
|
|
},
|
|
};
|
|
|
|
export const authToken = () => { return local.getItem('auth_token'); };
|
|
|
|
export default local;
|