diff options
| author | 8cy <[email protected]> | 2020-04-03 02:48:28 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-03 02:48:28 -0700 |
| commit | f9159ea2d994e14180fb02ab562f0119513e67cf (patch) | |
| tree | 09d14cdf05456567156738b681379d4bccd64e5c /node_modules/lowdb/lib/browser.js | |
| parent | 2020/04/03, 02:42, V1.2.1 (diff) | |
| download | s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.tar.xz s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.zip | |
2020/04/03, 02:47, V1.2.2
Diffstat (limited to 'node_modules/lowdb/lib/browser.js')
| -rw-r--r-- | node_modules/lowdb/lib/browser.js | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/node_modules/lowdb/lib/browser.js b/node_modules/lowdb/lib/browser.js deleted file mode 100644 index e0bd3fb..0000000 --- a/node_modules/lowdb/lib/browser.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -/* global localStorage */ - -module.exports = { - read: function read(source) { - var deserialize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : JSON.parse; - - var data = localStorage.getItem(source); - if (data) { - return deserialize(data); - } else { - localStorage.setItem(source, '{}'); - return {}; - } - }, - write: function write(dest, obj) { - var serialize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : JSON.stringify; - return localStorage.setItem(dest, serialize(obj)); - } -};
\ No newline at end of file |