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

read-json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-json - npm Package Compare versions

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",

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