{
  "manifest": {
    "name": "jest-docblock",
    "version": "27.5.1",
    "repository": {
      "type": "git",
      "url": "https://github.com/facebook/jest.git",
      "directory": "packages/jest-docblock"
    },
    "license": "MIT",
    "main": "./build/index.js",
    "types": "./build/index.d.ts",
    "exports": {
      ".": {
        "types": "./build/index.d.ts",
        "default": "./build/index.js"
      },
      "./package.json": "./package.json"
    },
    "dependencies": {
      "detect-newline": "^3.0.0"
    },
    "devDependencies": {
      "@types/node": "*"
    },
    "engines": {
      "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
    },
    "publishConfig": {
      "access": "public"
    },
    "gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850",
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-jest-docblock-27.5.1-14092f364a42c6108d42c33c8cf30e058e25f6c0-integrity/node_modules/jest-docblock/package.json",
    "readmeFilename": "README.md",
    "readme": "# jest-docblock\n\n`jest-docblock` is a package that can extract and parse a specially-formatted comment called a \"docblock\" at the top of a file.\n\nA docblock looks like this:\n\n```js\n/**\n * Stuff goes here!\n */\n```\n\nDocblocks can contain pragmas, which are words prefixed by `@`:\n\n```js\n/**\n * Pragma incoming!\n *\n * @flow\n */\n```\n\nPragmas can also take arguments:\n\n```js\n/**\n * Check this out:\n *\n * @myPragma it is so cool\n */\n```\n\n`jest-docblock` can:\n\n- extract the docblock from some code as a string\n- parse a docblock string's pragmas into an object\n- print an object and some comments back to a string\n\n## Installation\n\n```sh\n# with yarn\n$ yarn add jest-docblock\n# with npm\n$ npm install jest-docblock\n```\n\n## Usage\n\n```js\nconst code = `\n/**\n * Everything is awesome!\n *\n * @everything is:awesome\n * @flow\n */\n\n export const everything = Object.create(null);\n export default function isAwesome(something) {\n   return something === everything;\n }\n`;\n\nconst {\n  extract,\n  strip,\n  parse,\n  parseWithComments,\n  print,\n} = require('jest-docblock');\n\nconst docblock = extract(code);\nconsole.log(docblock); // \"/**\\n * Everything is awesome!\\n * \\n * @everything is:awesome\\n * @flow\\n */\"\n\nconst stripped = strip(code);\nconsole.log(stripped); // \"export const everything = Object.create(null);\\n export default function isAwesome(something) {\\n return something === everything;\\n }\"\n\nconst pragmas = parse(docblock);\nconsole.log(pragmas); // { everything: \"is:awesome\", flow: \"\" }\n\nconst parsed = parseWithComments(docblock);\nconsole.log(parsed); // { comments: \"Everything is awesome!\", pragmas: { everything: \"is:awesome\", flow: \"\" } }\n\nconsole.log(print({pragmas, comments: 'hi!'})); // /**\\n * hi!\\n *\\n * @everything is:awesome\\n * @flow\\n */;\n```\n\n## API Documentation\n\n### `extract(contents: string): string`\n\nExtracts a docblock from some file contents. Returns the docblock contained in `contents`. If `contents` did not contain a docblock, it will return the empty string (`\"\"`).\n\n### `strip(contents: string): string`\n\nStrips the top docblock from a file and return the result. If a file does not have a docblock at the top, then return the file unchanged.\n\n### `parse(docblock: string): {[key: string]: string | string[] }`\n\nParses the pragmas in a docblock string into an object whose keys are the pragma tags and whose values are the arguments to those pragmas.\n\n### `parseWithComments(docblock: string): { comments: string, pragmas: {[key: string]: string | string[]} }`\n\nSimilar to `parse` except this method also returns the comments from the docblock. Useful when used with `print()`.\n\n### `print({ comments?: string, pragmas?: {[key: string]: string | string[]} }): string`\n\nPrints an object of key-value pairs back into a docblock. If `comments` are provided, they will be positioned on the top of the docblock.\n",
    "description": "`jest-docblock` is a package that can extract and parse a specially-formatted comment called a \"docblock\" at the top of a file.",
    "licenseText": "MIT License\n\nCopyright (c) Facebook, Inc. and its affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz",
    "hash": "14092f364a42c6108d42c33c8cf30e058e25f6c0",
    "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==",
    "registry": "npm",
    "packageName": "jest-docblock",
    "cacheIntegrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== sha1-FAkvNkpCxhCNQsM8jPMOBY4l9sA="
  },
  "registry": "npm",
  "hash": "14092f364a42c6108d42c33c8cf30e058e25f6c0"
}