{"_id":"read-json-safe","_rev":"139494","name":"read-json-safe","description":"Read JSON files without try catch","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"time":{"modified":"2021-06-03T11:25:59.000Z","created":"2020-08-16T03:31:46.292Z","2.0.2":"2020-10-04T17:57:29.928Z","2.0.1":"2020-10-04T16:04:01.703Z","2.0.0":"2020-10-04T15:51:46.977Z","1.0.5":"2020-09-03T02:28:13.932Z","1.0.4":"2020-09-02T04:20:26.711Z","1.0.3":"2020-09-02T03:32:45.504Z","1.0.2":"2020-08-28T03:26:49.277Z","1.0.1":"2020-08-16T03:33:40.374Z","1.0.0":"2020-08-16T03:31:46.292Z"},"users":{},"author":{"name":"Connor White"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"versions":{"2.0.2":{"name":"read-json-safe","version":"2.0.2","description":"Read JSON files without try catch","license":"MIT","author":{"name":"Connor White"},"homepage":"https://connorwhite.org/read-json-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"keywords":["json","read","file","safe","try","catch","ENOENT"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","postversion":"git push","prepublishOnly":"yarn build","release":"bob publish","test":"bob test"},"dependencies":{"parse-json-object":"^2.0.1","read-file-safe":"^1.0.9"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.0.27","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"read-json-safe@2.0.2","dist":{"shasum":"747109960bad6de251056530d78b7a7482e70b16","size":2641,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-2.0.2.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_2.0.2_1601834249829_0.8063942558751855"},"_hasShrinkwrap":false,"publish_time":1601834249928,"_cnpm_publish_time":1601834249928},"2.0.1":{"name":"read-json-safe","version":"2.0.1","description":"Read objects from JSON files without try catch","license":"MIT","author":{"name":"Connor White"},"homepage":"https://connorwhite.org/read-json-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"keywords":["json","read","file","safe","try","catch","ENOENT"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","postversion":"git push","prepublishOnly":"yarn build","release":"bob publish","test":"bob test"},"dependencies":{"parse-json-object":"^2.0.1","read-file-safe":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.0.27","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"read-json-safe@2.0.1","dist":{"shasum":"e2a7706a4556ce4ade499e9ff6cc2ae93cb0fe57","size":2601,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-2.0.1.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_2.0.1_1601827441545_0.9402558229614617"},"_hasShrinkwrap":false,"publish_time":1601827441703,"_cnpm_publish_time":1601827441703},"2.0.0":{"name":"read-json-safe","version":"2.0.0","description":"Read objects from JSON files without try catch","license":"MIT","author":{"name":"Connor White"},"homepage":"https://connorwhite.org/read-json-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"keywords":["json","read","file","safe","try","catch","ENOENT"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","postversion":"git push","prepublishOnly":"yarn build","release":"bob publish","test":"bob test"},"dependencies":{"parse-json-object":"^2.0.1","read-file-safe":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2","@types/mock-fs":"^4.10.0","@types/node":"^14.0.27","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"read-json-safe@2.0.0","dist":{"shasum":"e9c4031c27d04640203e29d7936307003a9cd708","size":2474,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-2.0.0.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_2.0.0_1601826706792_0.3491028360380628"},"_hasShrinkwrap":false,"publish_time":1601826706977,"_cnpm_publish_time":1601826706977},"1.0.5":{"name":"read-json-safe","version":"1.0.5","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"homepage":"https://connorwhite.org/read-json-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build","postversion":"git push"},"dependencies":{"parse-json-object":"^1.0.5","read-file-safe":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^1.9.7","@types/node":"^14.0.27"},"_id":"read-json-safe@1.0.5","dist":{"shasum":"c459443b8e6eb3a2672cf68ddc81d2f4ef95c8d7","size":1654,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.5.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.5_1599100093792_0.04211834057682462"},"_hasShrinkwrap":false,"publish_time":1599100093932,"_cnpm_publish_time":1599100093932},"1.0.4":{"name":"read-json-safe","version":"1.0.4","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build"},"dependencies":{"parse-json-object":"^1.0.4","read-file-safe":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^1.9.7","@types/node":"^14.0.27"},"_id":"read-json-safe@1.0.4","dist":{"shasum":"afbf753394a8f976da4ac7f3d4161e3f6dd6025e","size":1628,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.4.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.4_1599020426515_0.09314424324807469"},"_hasShrinkwrap":false,"publish_time":1599020426711,"_cnpm_publish_time":1599020426711},"1.0.3":{"name":"read-json-safe","version":"1.0.3","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build"},"dependencies":{"parse-json-object":"^1.0.3","read-file-safe":"^1.0.3"},"devDependencies":{"@bconnorwhite/bob":"^1.9.6","@types/node":"^14.0.27"},"_id":"read-json-safe@1.0.3","dist":{"shasum":"560a261efcbcc1bba4f5995f57d43424e56fc373","size":1758,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.3.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.3_1599017565393_0.8890454668890968"},"_hasShrinkwrap":false,"publish_time":1599017565504,"_cnpm_publish_time":1599017565504},"1.0.2":{"name":"read-json-safe","version":"1.0.2","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"dependencies":{"parse-json-object":"^1.0.3","read-file-safe":"^1.0.3"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"_id":"read-json-safe@1.0.2","dist":{"shasum":"8280ae3eac4b92d46700bad76fd40154a1cccc35","size":1430,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.2.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.2_1598585209173_0.40244186890778355"},"_hasShrinkwrap":false,"publish_time":1598585209277,"_cnpm_publish_time":1598585209277},"1.0.1":{"name":"read-json-safe","version":"1.0.1","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"dependencies":{"parse-json-object":"^1.0.0","read-file-safe":"^1.0.1"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"_id":"read-json-safe@1.0.1","dist":{"shasum":"ec248be5ea9e50c7900a568834d2263c4e1ec3af","size":1428,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.1.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.1_1597548820190_0.26578811661548096"},"_hasShrinkwrap":false,"publish_time":1597548820374,"_cnpm_publish_time":1597548820374},"1.0.0":{"name":"read-json-safe","version":"1.0.0","description":"Read objects from JSON files without try catch.","author":{"name":"Connor White"},"license":"MIT","keywords":["json","read","file","safe","try","catch","ENOENT"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-file-safe.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"dependencies":{"parse-json-object":"^1.0.0","read-file-safe":"^1.0.1"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"_id":"read-json-safe@1.0.0","dist":{"shasum":"1bfcd9de76fc6163ac78abd92b8a8b17b1c7aa6f","size":1429,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-json-safe/download/read-json-safe-1.0.0.tgz"},"maintainers":[{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_1.0.0_1597548706189_0.3847058391772926"},"_hasShrinkwrap":false,"publish_time":1597548706292,"_cnpm_publish_time":1597548706292}},"readme":"<div align=\"center\">\n  <h1>read-json-safe</h1>\n  <a href=\"https://npmjs.com/package/read-json-safe\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/read-json-safe.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/read-json-safe\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/read-json-safe.svg\">\n  </a>\n  <a href='https://coveralls.io/github/bconnorwhite/read-json-safe?branch=master'>\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/read-json-safe.svg?branch=master\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/read-json-safe\">\n    <img alt=\"GitHub Stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/read-json-safe?label=Stars%20Appreciated%21&style=social\">\n  </a>\n  <a href=\"https://twitter.com/bconnorwhite\">\n    <img alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite&style=social\">\n  </a>\n</div>\n\n<br />\n\n> Read JSON files without try catch.\n\nReturns `undefined` on errors, for example if the file does not exist.\n\n## Installation\n\n```sh\nyarn add read-json-safe\n```\n\n```sh\nnpm install read-json-safe\n```\n\n## API\n\n### Read a JSONValue:\n\n```ts\nimport { readJSON, readJSONSync, JSONValue } from \"read-json-safe\";\n\nfunction readJSON(path: string): Promise<JSONValue | undefined>;\n\nfunction readJSONSync(path: string): JSONValue | undefined;\n\ntype JSONValue = string | number | boolean | JSONObject | JSONArray | null;\n```\n\n### Read a JSONObject:\n\n```ts\nimport { readJSONObject, readJSONObjectSync, JSONObject } from \"read-json-safe\";\n\nfunction readJSONObject(path: string): Promise<JSONObject| undefined>;\n\nfunction readJSONObjectSync(path: string): JSONObject| undefined;\n\ntype JSONObject = {\n    [key: string]: JSONValue;\n}\n```\n\n### Read a JSONArray:\n\n```ts\nimport { readJSONArray, readJSONArraySync, JSONArray } from \"read-json-safe\";\n\nfunction readJSONArray(path: string): Promise<JSONArray | undefined>;\n\nfunction readJSONArraySync(path: string): JSONArray | undefined;\n\ntype JSONArray = Array<JSONValue>;\n```\n\n<br />\n\n<h2>Dependencies<img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/read-json-safe.svg\"></h2>\n\n- [parse-json-object](https://www.npmjs.com/package/parse-json-object): Parse a typed JSON object\n- [read-file-safe](https://www.npmjs.com/package/read-file-safe): Read files without try catch\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/read-json-safe.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): undefined\n- [@types/mock-fs](https://www.npmjs.com/package/@types/mock-fs): TypeScript definitions for mock-fs\n- [@types/node](https://www.npmjs.com/package/@types/node): TypeScript definitions for Node.js\n- [mock-fs](https://www.npmjs.com/package/mock-fs): A configurable mock file system.  You know, for testing.\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/read-json-safe.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n\n<br />\n\n## Related Packages\n\n- [fs-safe](https://www.npmjs.com/package/fs-safe): A simple fs wrapper that doesn't throw\n- [read-file-safe](https://www.npmjs.com/package/read-file-safe): Read files without try catch\n- [read-lcov-safe](https://www.npmjs.com/package/read-lcov-safe): Read and parse an lcov file without try catch\n- [read-md-safe](https://www.npmjs.com/package/read-md-safe): Read markdown files as a [Marked](https://www.npmjs.com/package/marked) token list or string\n","_attachments":{},"homepage":"https://connorwhite.org/read-json-safe","license":"MIT"}