Created
November 1, 2018 20:37
-
-
Save blubbll/663c6f638f695fb96d332eb4e9745f16 to your computer and use it in GitHub Desktop.
simpleLS
This file contains hidden or 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
| var simpleLS = { | |
| set : function(obj, val){ | |
| localStorage.setItem(obj, $.fn.stringifyJSON(val)); | |
| }, | |
| get: function(obj){ | |
| return $.parseJSON($.fn.stringifyJSON(localStorage.getItem(obj))) || {}; | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment