Comparing version 0.2.0 to 1.0.0
14
index.js
var fs = require("fs"); | ||
var call = require("try-call"); | ||
module.exports = readJSON; | ||
module.exports = async; | ||
module.exports.sync = sync; | ||
function readJSON(filename, options, callback){ | ||
function async (filename, options, callback) { | ||
if(arguments.length == 2){ | ||
@@ -16,7 +17,10 @@ callback = options; | ||
}); | ||
} | ||
function parse (bf) { | ||
return JSON.parse(bf.toString().replace(/^\ufeff/g, '')); | ||
} | ||
function sync (filename, options) { | ||
return parse(fs.readFileSync(filename, options)); | ||
} | ||
function parse (bf) { | ||
return JSON.parse(bf.toString().replace(/^\ufeff/g, '')); | ||
} |
{ | ||
"name": "read-json", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Reads and parses a JSON file.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1264
20
1