+6
-4
@@ -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", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
5037
1.86%87
2.35%0
-100%1
Infinity%