node/tools/eslint/node_modules/read-json-sync
silverwind d9b8758f47 tools: update ESLint to 2.7.0
PR-URL: https://github.com/nodejs/node/pull/6132
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
2016-04-20 16:24:21 -07:00
..
index.js tools: update eslint to v1.10.3 2016-01-14 22:20:14 +11:00
LICENSE tools: update eslint to v1.10.3 2016-01-14 22:20:14 +11:00
package.json tools: update ESLint to 2.7.0 2016-04-20 16:24:21 -07:00
README.md tools: update eslint to v1.10.3 2016-01-14 22:20:14 +11:00

read-json-sync

NPM version Build Status Build status Coverage Status Dependency Status devDependency Status

A Node module to read and parse a JSON file synchronously

const 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.

Installation

Use npm.

npm install read-json-sync

API

const 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 - 2015 Shinnosuke Watanabe

Licensed under the MIT License.