{"name":"read-json-sync","version":"2.0.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"},"license":"ISC","scripts":{"bench":"node benchmark/runner string-slice && node benchmark/runner string-replace && node benchmark/runner buffer-string-slice","pretest":"eslint .","test":"nyc node test/test.js"},"keywords":["data","json","file","read","load","bom","parse","synchronous","synchronously","sync"],"devDependencies":{"@shinnn/eslint-config":"^6.8.7","chalk":"^2.4.1","eslint":"^5.10.0","nyc":"^13.1.0","nyc-config-common":"^1.0.1","tape":"^4.9.1"},"eslintConfig":{"extends":"@shinnn"},"nyc":{"extends":"nyc-config-common"},"gitHead":"4bbbe43750dec0ae4d101769b9b4d38aa7e573d3","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.1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"integrity":"sha512-8ZJRyVJ6jKMzXsuoTTb/LPQusL/bNdNZi1GV5cZ8m9JSvHGIfI7caizhNOPkLVaZWGUrARc88cAftSnRE1liDg==","shasum":"3f3107bc485c6be7317bd9a6feb3331e9993ea03","tarball":"http://registry-npm.ywwl.com/read-json-sync/download/read-json-sync-2.0.1.tgz","fileCount":4,"unpackedSize":5060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFkxcCRA9TVsSAnZWagAAnZoP/i8vxlxg5yqeBs9CCfjp\nwd1dTCfUCY2Sq6moJBeki3jXy1u/79dg4+cIFI9jbVxUnkyM7EXK8tBemmbF\nhVGjGu/VwM7gdJQbD/CGhxAYODUqQmuevK3CmacpGqIEwqCizCRgFouXZKi1\nKFeZoATZdbBfIkbopnywjqvbF+k7ZMzA8INIl3FYiK4Ym5va1w97bLue7BCd\nld7/0I/pePuM08vHcNWqNOWpxWCAGKyTPyemR2rbr3rQVmzBGNzco9d4j8Uf\nqXNVtb4k9/O6ibZ2yhtogjGEIf6yX1FYl8gXMLWYT47idiAiIN9ZAb+yRZYi\n98x1JWKpNvKcKyNWvgAdGChodX49QdRavl8baDFdd3DskZ5MkTN8dmZiDfmI\nscSKFOiAo0r3KcShmbSE+cjZmk+pXhCgMx4oqChcddF0WXyMUjiVLcAww80H\nOgaxi2dDVehf9DUQL5AYGImvZv8U9KPIeMlURqB2Ikyu9mVN+ORX+C5FngSy\n+1edyJ9HIalJf9Nxkg1X40wVTO+21gt6uWwj8yhKtQcn961lMSPwFNNwB0bP\nIjbDeUZyE1xGCS2TPDz9Gz8b19ym+fX7xBDAFfSzOGSYKDJ6lNv33w0LN2my\n01BSlMW9K4X77dmhU6gg2920UliAc9ZdhBCP0mgh2S0QJEvCI8M532Y5rgzf\nNnXb\r\n=nKOy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBl9I6yVrZs0lNAIA91MsiKoMG7ZflpM7wMo++HTxIVAiAJ0+soqFGlWppDQ6gL5fdahpxp4RqFE5QouqdqNwaHZg=="}],"size":2491,"noattachment":false,"key":"/read-json-sync/-/read-json-sync-2.0.1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-sync_2.0.1_1544965211968_0.7205293821099812"},"_hasShrinkwrap":false,"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":1544965212132,"_cnpm_publish_time":1544965212132,"dist-tags":{"latest":"2.0.1"}}