{"name":"read-json-sync","version":"1.0.0","description":"Read and parse a JSON file synchronously","repository":{"type":"git","url":"https://github.com/shinnn/read-json-sync"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint *.js & jscs *.js","test":"node test.js | tap-spec","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/read-json-sync/blob/master/LICENSE"}],"files":["index.js","LICENSE"],"keywords":["json","virtual","file","parse","synchronous","sync"],"devDependencies":{"eslint":"^0.8.2","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.0","jscs":"^1.6.2","require-main":"^0.1.1","tap-spec":"^1.0.0","tape":"^3.0.0"},"gitHead":"20b136c93b6744bc6a38e83bc8254887ba037531","bugs":{"url":"https://github.com/shinnn/read-json-sync/issues"},"homepage":"https://github.com/shinnn/read-json-sync","_id":"read-json-sync@1.0.0","_shasum":"1858a54b248a98fe732930c61dd2fd77b51e693f","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"1858a54b248a98fe732930c61dd2fd77b51e693f","tarball":"http://registry-npm.ywwl.com/read-json-sync/download/read-json-sync-1.0.0.tgz","integrity":"sha512-CaUTisFFAVdE38lHBjl1FmNbf7+rttMeA7NzrcIj5cl1Mk8ij6bv+YK/0NnC0GS8xdBFW60K/Q46dVsUgaU69Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYx1JKb7SAMBgaZi1qQ/QCGpwTTjp6mIZFKqXALiHlSAiEAvKRmdoqLesc5YsZ4MWTIVf6DWC3RUBw3nbF8aqVKMr8="}],"size":2106,"noattachment":false,"key":"/read-json-sync/-/read-json-sync-1.0.0.tgz"},"directories":{},"readme":"# read-json-sync\n\n[![npm version](https://img.shields.io/npm/v/read-json-sync.svg)](https://www.npmjs.com/package/read-json-sync)\n[![Build Status](https://travis-ci.com/shinnn/read-json-sync.svg?branch=master)](https://travis-ci.com/shinnn/read-json-sync)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/read-json-sync.svg)](https://coveralls.io/github/shinnn/read-json-sync)\n\nA [Node.js](https://nodejs.org/) module to read and parse a [JSON](https://json.org/) file synchronously\n\n```javascript\nconst readJsonSync = require('read-json-sync');\n\nreadJsonSync('package.json'); //=> {name: 'read-json-sync', version: '1.0.0', ...}\n```\n\nNode.js built-in [`require`](https://nodejs.org/api/globals.html#globals_require) and [`import`](https://nodejs.org/api/esm.html#esm_interop_with_existing_modules) can do almost the same thing, but this module doesn't [cache](https://nodejs.org/api/modules.html#modules_caching) results.\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install read-json-sync\n```\n\n## API\n\n```javascript\nconst readJsonSync = require('read-json-sync');\n```\n\n### readJsonSync(*path* [, *options*])\n\n*path*: `string` [`Buffer`](https://nodejs.org/api/buffer.html#buffer_class_buffer) [`URL`](https://nodejs.org/api/url.html#url_class_url) (JSON filename) or `integer` (file descriptor)  \n*options*: `Object` `string` ([`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or an encoding of the file)  \nReturn: `any` (parsed [JSON](https://tools.ietf.org/html/rfc7159) data)\n\nIt automatically ignores the leading [byte order mark](https://unicode.org/faq/utf_bom.html).\n\n```javascript\n// with-bom.json: '\\uFEFF{\"a\": 1}'\n\nJSON.parse('\\uFEFF{\"a\": 1}'); // throws a SyntaxError\n\nreadJsonSync('with-bom.json'); //=> {a: 1}\n```\n\n## License\n\n[ISC License](./LICENSE) © 2017 - 2018 Shinnosuke Watanabe\n","publish_time":1412863716194,"_cnpm_publish_time":1412863716194,"dist-tags":{"latest":"2.0.1"}}