Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars` such that it finds a few instances in our code base that it did not find previously (fixed in previous commits readying this for landing). PR-URL: https://github.com/nodejs/node/pull/7601 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> |
||
|---|---|---|
| .. | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
read-json-sync
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
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.