🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

json-file

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-file - npm Package Compare versions

Comparing version
0.0.0
to
0.1.0
+6
-4
lib/index.js

@@ -47,9 +47,11 @@

File.prototype.write = function(callback) {
var json = JSON.stringify(this.data, null, this.indent);
File.prototype.write = function(callback, replacer, space) {
var space = space || this.indent,
json = JSON.stringify(this.data, replacer, space);
fs.writeFile(this.path, json, callback);
};
File.prototype.writeSync = function() {
var json = JSON.stringify(this.data, null, this.indent);
File.prototype.writeSync = function(replacer, space) {
var space = space || this.indent,
json = JSON.stringify(this.data, replacer, space);
fs.writeFileSync(this.path, json);

@@ -56,0 +58,0 @@ };

+1
-1
{
"name": "json-file",
"version": "0.0.0",
"version": "0.1.0",
"description": "A module for modifiying JSON files",

@@ -5,0 +5,0 @@ "main": "lib/index.js",