Created
July 10, 2022 23:23
-
-
Save pfftdammitchris/ef1504b9ad507258056e15c7cfe63fee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LocalStorage() { | |
let _data = {} | |
let _options = {} | |
return { | |
get(key) { | |
return _data[key] | |
}, | |
set(key, value) { | |
_data[key] = value | |
}, | |
remove(key) { | |
delete _data[key] | |
}, | |
clear() { | |
_data = {} | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment