Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-file-object

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-file-object - npm Package Compare versions

Comparing version 2.0.1 to 2.0.3

24

index.js

@@ -1,9 +0,7 @@

// Generated by CoffeeScript 2.3.1
// Generated by CoffeeScript 2.5.0
(function() {
var created_db, erase, find_file, fs, ld, onWrite, stop, stopped, writeFile;
var created_db, erase, find_file, fs, onWrite, stop, stopped, writeFile;
fs = require('fs');
ld = require('lodash');
onWrite = {};

@@ -90,5 +88,7 @@

for (file in created_db) {
results.push(onWrite[file] = function() {
return erase(file);
});
results.push((function(file) {
return onWrite[file] = function() {
return erase(file);
};
})(file));
}

@@ -99,6 +99,8 @@ return results;

stop = function(file) {
var interval;
({interval} = created_db[file]);
clearInterval(interval);
delete created_db[file];
var record;
record = created_db[file];
if (record != null) {
clearInterval(record.interval);
delete created_db[file];
}
return delete onWrite[file];

@@ -105,0 +107,0 @@ };

{
"name": "json-file-object",
"version": "2.0.1",
"version": "2.0.3",
"description": "periodically persisting JSON-able objects into files (one per object)",

@@ -17,7 +17,4 @@ "main": "index.js",

"devDependencies": {
"coffeescript": "^2.3.1"
},
"dependencies": {
"lodash": "^4.17.15"
"coffeescript": "^2.4.1"
}
}

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 2.3.1
// Generated by CoffeeScript 2.5.0
(function() {

@@ -3,0 +3,0 @@ var json_file_object, my_obj;

@@ -1,7 +0,5 @@

// Generated by CoffeeScript 2.3.1
// Generated by CoffeeScript 2.5.0
(function() {
var counter, json_file_object, ld, my_obj, test;
var counter, json_file_object, my_obj, test;
ld = require('lodash');
json_file_object = require("./");

@@ -13,3 +11,4 @@

value: {
hey: "Start"
hey: "Start",
q: []
},

@@ -23,3 +22,3 @@ file: "test.json",

console.log(counter, JSON.stringify(my_obj));
my_obj[counter] = ld.clone(my_obj);
my_obj.q.push(counter);
if (counter > 0) {

@@ -26,0 +25,0 @@ counter--;

{
"0": {
"1": {
"2": {
"3": {
"hey": "Start"
},
"hey": "Start"
},
"3": {
"hey": "Start"
},
"hey": "Start"
},
"2": {
"3": {
"hey": "Start"
},
"hey": "Start"
},
"3": {
"hey": "Start"
},
"hey": "Start"
},
"1": {
"2": {
"3": {
"hey": "Start"
},
"hey": "Start"
},
"3": {
"hey": "Start"
},
"hey": "Start"
},
"2": {
"3": {
"hey": "Start"
},
"hey": "Start"
},
"3": {
"hey": "Start"
},
"hey": "Start"
"hey": "Start",
"q": [
3,
2,
1,
0
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc