json-autosave
Advanced tools
Comparing version
@@ -82,3 +82,8 @@ var fsos = require('fsos'); | ||
}).catch(function(e) { | ||
var data = options.data || null; | ||
if (options.data === undefined) { | ||
// JSON.stringify(undefined) === undefined… | ||
var data = null; | ||
} else { | ||
var data = options.data; | ||
} | ||
fsos.set(file, JSON.stringify(data)).then(function() { | ||
@@ -85,0 +90,0 @@ resolve(new JsonSave(data, file, options)); |
{ | ||
"name": "json-autosave", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Automatically save a JSON-serializable object.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7484
1.85%186
2.76%