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

read-json-sync

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-sync

Read and parse a JSON file synchronously

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49K
increased by21.36%
Maintainers
1
Weekly downloads
 
Created
Source

read-json-sync

NPM version Build Status Build status Coverage Status devDependency Status

A Node module to read and parse a JSON file synchronously

var readJsonSync = require('read-json-sync');

readJsonSync('package.json');
//=> {name: 'read-json-sync', version: '1.0.0', ...}

Node's built-in require can do almost the same thing, but this module doesn't cache results.

Check read-json module if you want to read a JSON file asynchronously.

Installation

Install with npm.

npm install read-json-sync

API

var readJsonSync = require('read-json-sync');

readJsonSync(filePath [, options])

filePath: String (path to a JSON file)
options: Object (fs.readFile options)
Return: Object (parsed JSON data)

License

Copyright (c) 2014 Shinnosuke Watanabe

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 09 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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