mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
1d45367aa1
* Fixed duplication kve bug * Added semistandard and updated code * Actually got it working * Even better * I think it should work on Windows now
18 lines
284 B
JavaScript
18 lines
284 B
JavaScript
const localStorageMock = (function () {
|
|
let store = {};
|
|
|
|
return {
|
|
getItem (key) {
|
|
return store[key];
|
|
},
|
|
setItem (key, value) {
|
|
store[key] = value.toString();
|
|
},
|
|
clear () {
|
|
store = {};
|
|
}
|
|
};
|
|
})();
|
|
|
|
global.localStorage = localStorageMock;
|