Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfftdammitchris/ef1504b9ad507258056e15c7cfe63fee to your computer and use it in GitHub Desktop.
Save pfftdammitchris/ef1504b9ad507258056e15c7cfe63fee to your computer and use it in GitHub Desktop.
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