json-file-object
Advanced tools
Comparing version 1.1.1 to 2.0.0
11
index.js
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.12.3 | ||
// Generated by CoffeeScript 2.3.1 | ||
(function() { | ||
@@ -11,5 +11,4 @@ var created_db, erase, find_file, fs, ld, stop, writeFile; | ||
module.exports = function(arg) { | ||
var error, file, forceNew, interval, ref, saveEverySecs, value; | ||
ref = arg != null ? arg : {}, value = ref.value, file = ref.file, saveEverySecs = ref.saveEverySecs, forceNew = ref.forceNew; | ||
module.exports = function({value, file, saveEverySecs, forceNew} = {}) { | ||
var error, interval; | ||
if (value == null) { | ||
@@ -41,3 +40,3 @@ value = {}; | ||
obj: value, | ||
interval: interval | ||
interval | ||
}; | ||
@@ -94,3 +93,3 @@ } | ||
var interval; | ||
interval = created_db[file].interval; | ||
({interval} = created_db[file]); | ||
clearInterval(interval); | ||
@@ -97,0 +96,0 @@ return delete created_db[file]; |
{ | ||
"name": "json-file-object", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "periodically persisting JSON-able objects into files (one per object)", | ||
@@ -17,7 +17,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"coffee-script": "^1.9.2" | ||
"coffeescript": "^2.3.1" | ||
}, | ||
"dependencies": { | ||
"lodash": "^2.4.1" | ||
"lodash": "^4.17.10" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.12.3 | ||
// Generated by CoffeeScript 2.3.1 | ||
(function() { | ||
@@ -13,3 +13,3 @@ var json_file_object, my_obj; | ||
console.log("Value of 'my_obj': " + (JSON.stringify(my_obj))); | ||
console.log(`Value of 'my_obj': ${JSON.stringify(my_obj)}`); | ||
@@ -16,0 +16,0 @@ setTimeout(function() { |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.12.3 | ||
// Generated by CoffeeScript 2.3.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var counter, json_file_object, ld, my_obj, test; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10184
187
+ Addedlodash@4.17.21(transitive)
- Removedlodash@2.4.2(transitive)
Updatedlodash@^4.17.10