{"name":"read-json-sync","version":"1.1.1","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":{"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"},"license":"MIT","files":["index.js"],"keywords":["data","json","file","read","load","parse","synchronous","synchronously","sync"],"dependencies":{"graceful-fs":"^4.1.2"},"devDependencies":{"@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"},"gitHead":"0999728ef395e327129fa5754c3f9d8d6040188b","bugs":{"url":"https://github.com/shinnn/read-json-sync/issues"},"homepage":"https://github.com/shinnn/read-json-sync#readme","_id":"read-json-sync@1.1.1","_shasum":"43c669ae864aae308dfbbb2721a67e295ec8fff6","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"43c669ae864aae308dfbbb2721a67e295ec8fff6","tarball":"http://registry-npm.ywwl.com/read-json-sync/download/read-json-sync-1.1.1.tgz","integrity":"sha512-gsW+Au195RPGTIAlJ+rNMwI5Zo6l7au+ZbMDs5pXw7Y1duGk6ZXnEbZq3o7PLuv6jD521bvjvto5imTyulSHBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDY/CTR1AxIc+QUTUd2JYRGgltdrYX7+zBf669sAWyAEAiEArkxljDBMaKQqWxO+sFYmHKumldF13/0rmbirz0QrmQU="}],"size":2068,"noattachment":false,"key":"/read-json-sync/-/read-json-sync-1.1.1.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":1449256686866,"_cnpm_publish_time":1449256686866,"dist-tags":{"latest":"2.0.1"}}