read-json-sync
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "read-json-sync", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Read and parse a JSON file synchronously", | ||
"repository": "shinnn/read-json-sync", | ||
"author": { | ||
"name": "Shinnosuke Watanabe", | ||
"url": "https://github.com/shinnn" | ||
}, | ||
"author": "Shinnosuke Watanabe (https://github.com/shinnn)", | ||
"scripts": { | ||
"pretest": "jscs index.js test/*.js && eslint index.js test/*.js", | ||
"test": "node test/test.js | tap-spec", | ||
"coverage": "istanbul cover test/test.js", | ||
"coveralls": "${npm_package_scripts_coverage} && istanbul-coveralls" | ||
"pretest": "eslint --config @shinnn/node-legacy index.js test/test.js", | ||
"test": "node --strong_mode --throw-deprecation --track-heap-objects test/test.js | tap-spec", | ||
"coverage": "node --strong_mode node_modules/.bin/istanbul cover test/test.js" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/shinnn/read-json-sync/blob/master/LICENSE" | ||
} | ||
], | ||
"license": "MIT", | ||
"files": [ | ||
@@ -26,26 +17,22 @@ "index.js" | ||
"keywords": [ | ||
"data", | ||
"json", | ||
"file", | ||
"read", | ||
"load", | ||
"parse", | ||
"synchronous", | ||
"synchronously", | ||
"sync" | ||
], | ||
"dependencies": { | ||
"graceful-fs": "^3.0.5" | ||
"graceful-fs": "^4.1.2" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^0.14.1", | ||
"istanbul": "^0.3.6", | ||
"istanbul-coveralls": "^1.0.1", | ||
"jscs": "^1.11.3", | ||
"tap-spec": "^2.2.1", | ||
"tape": "^3.5.0" | ||
}, | ||
"jscsConfig": { | ||
"preset": "google", | ||
"maximumLineLength": 98, | ||
"requireBlocksOnNewline": true, | ||
"validateLineBreaks": "LF" | ||
"@shinnn/eslint-config-node-legacy": "^1.0.0", | ||
"eslint": "^1.7.3", | ||
"istanbul": "^0.4.0", | ||
"tap-spec": "^4.1.0", | ||
"tape": "^4.2.2" | ||
} | ||
} |
@@ -7,15 +7,14 @@ # read-json-sync | ||
[![Coverage Status](https://img.shields.io/coveralls/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) | ||
[![Dependency Status](https://img.shields.io/david/shinnn/read-json-sync.svg?label=deps)](https://david-dm.org/shinnn/read-json-sync) | ||
[![devDependency Status](https://img.shields.io/david/dev/shinnn/read-json-sync.svg?label=devDeps)](https://david-dm.org/shinnn/read-json-sync#info=devDependencies) | ||
[![Dependency Status](https://david-dm.org/shinnn/read-json-sync.svg)](https://david-dm.org/shinnn/read-json-sync) | ||
[![devDependency Status](https://david-dm.org/shinnn/read-json-sync/dev-status.svg)](https://david-dm.org/shinnn/read-json-sync#info=devDependencies) | ||
A [Node](http://nodejs.org/) module to read and parse a JSON file synchronously | ||
A [Node](https://nodejs.org/) module to read and parse a [JSON](http://www.json.org/) file synchronously | ||
```javascript | ||
var readJsonSync = require('read-json-sync'); | ||
const readJsonSync = require('read-json-sync'); | ||
readJsonSync('package.json'); | ||
//=> {name: 'read-json-sync', version: '1.0.0', ...} | ||
readJsonSync('package.json'); //=> {name: 'read-json-sync', version: '1.0.0', ...} | ||
``` | ||
Node's built-in [`require`](http://nodejs.org/api/globals.html#globals_require) can do almost the same thing, but this module doesn't [cache](http://nodejs.org/api/modules.html#modules_caching) results. | ||
Node's built-in [`require`](https://nodejs.org/api/globals.html#globals_require) can do almost the same thing, but this module doesn't [cache](https://nodejs.org/api/modules.html#modules_caching) results. | ||
@@ -26,3 +25,3 @@ ## Installation | ||
```sh | ||
``` | ||
npm install read-json-sync | ||
@@ -34,3 +33,3 @@ ``` | ||
```javascript | ||
var readJsonSync = require('read-json-sync'); | ||
const readJsonSync = require('read-json-sync'); | ||
``` | ||
@@ -41,4 +40,4 @@ | ||
*filePath*: `String` (path to a JSON file) | ||
*options*: `Object` ([`fs.readFile`](http://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback) options) | ||
Return: `Object` (parsed JSON data) | ||
*options*: `Object` ([`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_filename_options_callback) options) | ||
Return: `Object` (parsed [JSON](https://tools.ietf.org/html/rfc7159) data) | ||
@@ -45,0 +44,0 @@ ## License |
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
5
4177
45
+ Addedgraceful-fs@4.2.11(transitive)
- Removedgraceful-fs@3.0.12(transitive)
- Removednatives@1.1.6(transitive)
Updatedgraceful-fs@^4.1.2