{"_id":"extract-first-json","_rev":"220019","name":"extract-first-json","description":"Extract the first JSON object or array from a string","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"time":{"modified":"2021-06-03T15:39:26.000Z","created":"2020-09-20T16:58:23.380Z","1.0.1":"2020-09-20T17:54:33.701Z","1.0.0":"2020-09-20T16:58:23.380Z"},"users":{},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/extract-first-json.git"},"versions":{"1.0.1":{"name":"extract-first-json","version":"1.0.1","description":"Extract the first JSON object or array from a string","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/extract-first-json","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/extract-first-json.git"},"keywords":["extract","json","object","array","from","string"],"main":"./build/index.js","scripts":{"build":"bob build","lint":"bob lint","postversion":"git push --tags","prepublishOnly":"yarn run build && yarn test","test":"jest"},"dependencies":{"parse-json-object":"^2.0.0","reduce-first":"^1.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.3.0","jest":"^26.4.2"},"eslintConfig":{"extends":"eslint-config-bob"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"extract-first-json@1.0.1","dist":{"shasum":"be828615ac0c83c982f22d8c93063e4f9dc2a356","size":1759,"noattachment":false,"key":"/extract-first-json/-/extract-first-json-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-first-json/download/extract-first-json-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/extract-first-json_1.0.1_1600624473572_0.31767450134563036"},"_hasShrinkwrap":false,"publish_time":1600624473701,"_cnpm_publish_time":1600624473701},"1.0.0":{"name":"extract-first-json","version":"1.0.0","description":"Extract the first JSON object or array from a string","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/extract-first-json","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/extract-first-json.git"},"keywords":["extract","json","object","array","from","string"],"main":"./build/index.js","scripts":{"build":"bob build","lint":"bob lint","postversion":"git push --tags","prepublishOnly":"yarn run build && yarn test","test":"jest"},"dependencies":{"parse-json-object":"^2.0.0","reduce-first":"^1.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.3.0","jest":"^26.4.2"},"eslintConfig":{"extends":"eslint-config-bob"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"extract-first-json@1.0.0","dist":{"shasum":"54563eda6f457cea2505c24a40c8ea80cb1a1357","size":1740,"noattachment":false,"key":"/extract-first-json/-/extract-first-json-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extract-first-json/download/extract-first-json-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/extract-first-json_1.0.0_1600621103215_0.23435158644866583"},"_hasShrinkwrap":false,"publish_time":1600621103380,"_cnpm_publish_time":1600621103380}},"readme":"<div align=\"center\">\n  <h1>extract-first-json</h1>\n  <a href=\"https://npmjs.com/package/extract-first-json\">\n    <img alt=\"npm\" src=\"https://img.shields.io/npm/v/extract-first-json.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/extract-first-json\">\n    <img alt=\"typescript\" src=\"https://img.shields.io/badge/TypeScript-%F0%9F%91%8D-blue.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/extract-first-json\">\n    <img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/extract-first-json?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> Extract the first JSON object or array from a string.\n\n## Installation\n\n```bash\nyarn add extract-first-json\n```\n\n```bash\nnpm install extract-first-json\n```\n\n<br />\n\n## API\n\n```ts\nimport { extractJSON, extractJSONObject, extractJSONArray } from \"extract-first-json\";\n\nconst string = `Results: { \"ok\": true }`;\n\nextractJSON(string); // { ok: true }\n```\n\n<br />\n\n<h2>Dependencies<img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/extract-first-json.svg\"></h2>\n\n- [parse-json-object](https://www.npmjs.com/package/parse-json-object): Parse a typed JSON object.\n- [reduce-first](https://www.npmjs.com/package/reduce-first): Return early from reduce\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/extract-first-json.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/extract-first-json.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n","_attachments":{},"homepage":"https://connorwhite.org/github/extract-first-json","license":"MIT"}