{"_id":"read-json-safe","_rev":"203418","name":"read-json-safe","description":"Read JSON files without try catch","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"time":{"modified":"2023-03-21T13:23:10.000Z","created":"2020-08-16T03:31:46.292Z","3.0.0":"2023-01-30T00:33:10.486Z","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":{"3.0.0":{"name":"read-json-safe","version":"3.0.0","description":"Read JSON files without try catch","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://connorwhite.org/read-json-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-json-safe.git"},"bugs":{"url":"https://github.com/bconnorwhite/read-json-safe/issues"},"keywords":["json","read","file","safe","try","catch","ENOENT"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","dev":"auto dev","lint":"auto lint","prepack":"yarn build","release":"auto release","test":"auto test","typecheck":"auto typecheck"},"dependencies":{"parse-json-object":"^3.0.1","read-file-safe":"^2.1.0"},"devDependencies":{"@types/mock-fs":"^4.10.0","@types/node":"^14.0.27","autorepo":"^0.1.9","mock-fs":"^4.13.0"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"read-json-safe@3.0.0","dist":{"shasum":"da3f44b7409aa4d55412101eb572533628b51996","size":2625,"noattachment":false,"key":"/read-json-safe/-/read-json-safe-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-3.0.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-json-safe_3.0.0_1675038790335_0.5125712542498031"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-30T00:33:10.486Z","publish_time":1675038790486,"_cnpm_publish_time":1675038790486},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-2.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:49.762Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-2.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:50.131Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-2.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:50.317Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.5.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:50.545Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.4.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:50.736Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.3.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:50.964Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:51.157Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:51.383Z"},"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://name.csiicloud.com:7001/read-json-safe/download/read-json-safe-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"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,"_cnpmcore_publish_time":"2021-12-16T20:55:51.576Z"}},"readme":"<!--BEGIN HEADER-->\n<div id=\"top\" 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</div>\n\n<br />\n\n<blockquote align=\"center\">Read JSON files without try catch.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/read-json-safe\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/read-json-safe?label=%E2%AD%90%EF%B8%8F&style=social\">\n</a>\n\n_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._\n<a href=\"https://twitter.com/bconnorwhite\">\n  <img align=\"right\" alt=\"Twitter\" src=\"https://img.shields.io/twitter/url?label=%40bconnorwhite&style=social&url=https%3A%2F%2Ftwitter.com%2Fbconnorwhite\">\n</a>\n\n---\n<!--END HEADER-->\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```sh\npnpm add read-json-safe\n```\n\n## Usage\n\n### Read a JSONValue:\n\n```ts\nimport { readJSON, readJSONSync, JSONValue } from \"read-json-safe\";\n\nreadJSON(\"file.json\"); // Promise<JSONValue | undefined>\nreadJSONSync(\"file.json\"); // JSONValue | undefined\n```\n\n### Read a JSONObject:\n\n```ts\nimport { readJSONObject, readJSONObjectSync, JSONObject } from \"read-json-safe\";\n\nreadJSONObject(\"file.json\"); // Promise<JSONObject | undefined>\nreadJSONObjectSync(\"file.json\"); // JSONObject | undefined\n```\n\n### Read a JSONArray:\n\n```ts\nimport { readJSONArray, readJSONArraySync, JSONArray } from \"read-json-safe\";\n\nreadJSONArray(\"file.json\"); // Promise<JSONArray | undefined>\nreadJSONArraySync(\"file.json\"); // JSONArray | undefined\n```\n\n<!--BEGIN FOOTER-->\n\n<br />\n\n<h2 id=\"dependencies\">Dependencies<a href=\"https://www.npmjs.com/package/read-json-safe?activeTab=dependencies\"><img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/librariesio/release/npm/read-json-safe.svg\"></a></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\n<br />\n\n<h3>Dev Dependencies</h3>\n\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- [autorepo](https://www.npmjs.com/package/autorepo): Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.\n- [mock-fs](https://www.npmjs.com/package/mock-fs): A configurable mock file system.  You know, for testing.\n\n\n<br />\n\n<h2 id=\"license\">License <a href=\"https://opensource.org/licenses/MIT\"><img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/read-json-safe.svg\"></a></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n<!--END FOOTER-->\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","bugs":{"url":"https://github.com/bconnorwhite/read-json-safe/issues"},"license":"MIT"}