{"_id":"parse-json-object","_rev":"139455","name":"parse-json-object","description":"Parse a typed JSON object","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"time":{"modified":"2021-06-03T11:25:56.000Z","created":"2020-08-16T03:23:18.690Z","2.0.1":"2020-10-04T04:41:12.713Z","2.0.0":"2020-09-10T03:15:31.025Z","1.1.0":"2020-09-07T20:14:25.800Z","1.0.6":"2020-09-07T19:30:53.987Z","1.0.5":"2020-09-03T02:19:19.838Z","1.0.4":"2020-09-02T03:28:44.170Z","1.0.3":"2020-08-28T03:14:04.313Z","1.0.2":"2020-08-28T03:12:36.041Z","1.0.1":"2020-08-28T03:01:36.769Z","1.0.0":"2020-08-16T03:23:18.690Z"},"users":{},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"versions":{"2.0.1":{"name":"parse-json-object","version":"2.0.1","description":"Parse a typed JSON object","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"types-json":"^1.2.0"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"parse-json-object@2.0.1","dist":{"shasum":"a441bd8c36d2c33a69516286e7e4138a23607ee0","size":2090,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-2.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_2.0.1_1601786472551_0.06313829552074957"},"_hasShrinkwrap":false,"publish_time":1601786472713,"_cnpm_publish_time":1601786472713},"2.0.0":{"name":"parse-json-object","version":"2.0.0","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build && yarn test","test":"jest"},"dependencies":{"types-json":"^1.2.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0","jest":"^26.4.2"},"_id":"parse-json-object@2.0.0","dist":{"shasum":"6f204f0a2a4188bcc04da7542bb08f3d74fe7dfc","size":1802,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-2.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_2.0.0_1599707730897_0.46771096263530554"},"_hasShrinkwrap":false,"publish_time":1599707731025,"_cnpm_publish_time":1599707731025},"1.1.0":{"name":"parse-json-object","version":"1.1.0","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build"},"dependencies":{"types-json":"^1.0.6"},"devDependencies":{"@bconnorwhite/bob":"^2.0.1"},"_id":"parse-json-object@1.1.0","dist":{"shasum":"eef60211cec368259723d8586ecec7252f8fcdb2","size":1539,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.1.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.1.0_1599509665687_0.28953316697164055"},"_hasShrinkwrap":false,"publish_time":1599509665800,"_cnpm_publish_time":1599509665800},"1.0.6":{"name":"parse-json-object","version":"1.0.6","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build"},"dependencies":{"types-json":"^1.0.6"},"devDependencies":{"@bconnorwhite/bob":"^2.0.1","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.6","dist":{"shasum":"0c353dd5cc9a9e1e9275bc7afcaac46a7a23d9b7","size":1149,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.6.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.6_1599507053802_0.5512055008507466"},"_hasShrinkwrap":false,"publish_time":1599507053987,"_cnpm_publish_time":1599507053987},"1.0.5":{"name":"parse-json-object","version":"1.0.5","description":"Parse a typed JSON object.","author":{"name":"Connor White","email":"connor.bcw@gmail.com"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build","postversion":"git push"},"dependencies":{"@bconnorwhite/json-types":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^1.9.7","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.5","dist":{"shasum":"53fa8c8ec9f6a9648708b9f2ff1d24f5d1f02a4c","size":1132,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.5.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.5_1599099559730_0.2591189748594358"},"_hasShrinkwrap":false,"publish_time":1599099559838,"_cnpm_publish_time":1599099559838},"1.0.4":{"name":"parse-json-object","version":"1.0.4","description":"Parse a typed JSON object.","author":{"name":"Connor White","email":"connor.bcw@gmail.com"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build"},"dependencies":{"@bconnorwhite/json-types":"^1.0.2"},"devDependencies":{"@bconnorwhite/bob":"^1.9.6","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.4","dist":{"shasum":"873f73dd6863fb390d4c110f265d82c38a0febd9","size":1123,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.4.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.4_1599017324035_0.4809930074518387"},"_hasShrinkwrap":false,"publish_time":1599017324170,"_cnpm_publish_time":1599017324170},"1.0.3":{"name":"parse-json-object","version":"1.0.3","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.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":{"@bconnorwhite/json-types":"^1.0.2"},"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":"parse-json-object@1.0.3","dist":{"shasum":"c4fd294d5006c06ed1dfa51000c4ef622ef5b163","size":1211,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.3.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.3_1598584444186_0.9542372325541615"},"_hasShrinkwrap":false,"publish_time":1598584444313,"_cnpm_publish_time":1598584444313},"1.0.2":{"name":"parse-json-object","version":"1.0.2","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.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"},"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"},"dependencies":{"@bconnorwhite/json-types":"^1.0.1","json-types":"^1.0.2"},"_id":"parse-json-object@1.0.2","dist":{"shasum":"f21da86df8ff9e6fdc81a1db01e709d6217d9d61","size":1218,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.2_1598584355934_0.6277808695314522"},"_hasShrinkwrap":false,"publish_time":1598584356041,"_cnpm_publish_time":1598584356041},"1.0.1":{"name":"parse-json-object","version":"1.0.1","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.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"},"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"},"dependencies":{"@bconnorwhite/json-types":"^1.0.1"},"_id":"parse-json-object@1.0.1","dist":{"shasum":"bd1924baf8fbf1078446e92eac053b5576f40632","size":1214,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.1_1598583696658_0.7956550953863779"},"_hasShrinkwrap":false,"publish_time":1598583696769,"_cnpm_publish_time":1598583696769},"1.0.0":{"name":"parse-json-object","version":"1.0.0","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.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"},"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":"parse-json-object@1.0.0","dist":{"shasum":"1b052a8a40818548f5a85488ae28974da64ee088","size":1216,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-json-object/download/parse-json-object-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.0_1597548198468_0.46746106662749365"},"_hasShrinkwrap":false,"publish_time":1597548198690,"_cnpm_publish_time":1597548198690}},"readme":"<div align=\"center\">\n  <h1>parse-json-object</h1>\n  <a href=\"https://npmjs.com/package/parse-json-object\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/parse-json-object.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/parse-json-object\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/parse-json-object.svg\">\n  </a>\n  <a href='https://coveralls.io/github/bconnorwhite/parse-json-object?branch=master'>\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/parse-json-object.svg?branch=master\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/parse-json-object\">\n    <img alt=\"GitHub Stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/parse-json-object?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> Parse a typed JSON object.\n\n- Returns `undefined` if unable to parse\n- Returns typed JSON object if successful\n\n## Installation\n\n```sh\nyarn add parse-json-object\n```\n\n```sh\nnpm install parse-json-object\n```\n\n## API\n\n### Types\n```ts\nimport parse, {\n  parseJSONValue,\n  parseJSONObject,\n  parseJSONArray,\n  parseString,\n  JSONValue,\n  JSONObject,\n  JSONValue,\n  JSONArray\n} from \"parse-json-object\";\n\nfunction parse<T extends JSONValue>(value: string | undefined, isType: (value: T) => boolean): T | undefined;\n\nfunction parseJSONValue<T extends JSONValue>(value?: string): T | undefined;\n\nfunction parseJSONObject<T extends JSONObject>(value?: string): T | undefined;\n\nfunction parseJSONArray<T extends JSONArray>(value?: string): T | undefined;\n\nfunction parseString<T extends string>(value?: string): T | undefined;\n\ntype JSONValue = string | number | boolean | null | JSONObject | JSONArray;\n\ntype JSONObject = {\n  [key in string]?: JSONValue\n};\n\ninterface JSONArray extends Array<JSONValue> {};\n```\n\n<br />\n\n<h2>Dependencies<img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/parse-json-object.svg\"></h2>\n\n- [types-json](https://www.npmjs.com/package/types-json): Type checking for JSON objects\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/parse-json-object.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for TypeScript projects\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/parse-json-object.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n\n<br />\n\n## Related Packages:\n\n- [stringify-json-object](https://www.npmjs.com/package/stringify-json-object): Stringify and format a JSON object\n- [types-json](https://www.npmjs.com/package/types-json): Type checking for JSON objects\n","_attachments":{},"homepage":"https://connorwhite.org/github/parse-json-object","license":"MIT"}