{"name":"read-json-sync","version":"2.0.0-3","description":"Read and parse a JSON file synchronously","repository":{"type":"git","url":"git+https://github.com/shinnn/read-json-sync.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"bench":"node benchmark/runner string-slice && node benchmark/runner string-replace && node benchmark/runner buffer-string-slice","pretest":"eslint --fix --format=codeframe benchmark index.js test","test":"istanbul cover test/test.js"},"license":"CC0-1.0","files":["index.js"],"keywords":["data","json","file","read","load","parse","synchronous","synchronously","sync"],"dependencies":{"graceful-fs":"^4.1.11"},"devDependencies":{"@shinnn/eslint-config-node":"^4.0.2","chalk":"^2.3.0","eslint":"^4.11.0","istanbul":"^0.4.5","tape":"^4.8.0"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"322364393b15d74f006c7fc3780caa3a6838b138","bugs":{"url":"https://github.com/shinnn/read-json-sync/issues"},"homepage":"https://github.com/shinnn/read-json-sync#readme","_id":"read-json-sync@2.0.0-3","_npmVersion":"5.5.1","_nodeVersion":"9.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"integrity":"sha512-5yGD8zc3cl/rLJI+Y80r/yfMk7y+uGbdpUqoyICy9442ZJ3Q1i6fUM1LDaTxvfcV2+QeuKvZ3FwzygfXizom/A==","shasum":"0c2f6e2aa951158b6df6721651b9fce244c218d0","tarball":"http://registry-npm.ywwl.com/read-json-sync/download/read-json-sync-2.0.0-3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChNDw2yP24YNaE2AkVzsJj9LP5FDIBNxXpKpb75YSZ2wIhAOueeM8ycOL3EyjDwWR9b2vwlVUgEiIG1F4UQeNh+Iq+"}],"size":2106,"noattachment":false,"key":"/read-json-sync/-/read-json-sync-2.0.0-3.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-sync-2.0.0-3.tgz_1510635928887_0.3584493272937834"},"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":1510635929015,"_cnpm_publish_time":1510635929015,"dist-tags":{"latest":"2.0.1"}}