{
  "_args": [
    [
      {
        "raw": "ansi-parser@^3.2.5",
        "scope": null,
        "escapedName": "ansi-parser",
        "name": "ansi-parser",
        "rawSpec": "^3.2.5",
        "spec": ">=3.2.5 <4.0.0",
        "type": "range"
      },
      "/home/zkochan/src/pnpm/packages/pnpm/node_modules/bug-killer"
    ]
  ],
  "_from": "ansi-parser@>=3.2.5 <4.0.0",
  "_id": "ansi-parser@3.2.8",
  "_inCache": true,
  "_location": "/ansi-parser",
  "_nodeVersion": "7.0.0",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/ansi-parser-3.2.8.tgz_1504872761381_0.49472976266406476"
  },
  "_npmUser": {
    "name": "ionicabizau",
    "email": "bizauionica@gmail.com"
  },
  "_npmVersion": "4.1.1",
  "_phantomChildren": {},
  "_requested": {
    "raw": "ansi-parser@^3.2.5",
    "scope": null,
    "escapedName": "ansi-parser",
    "name": "ansi-parser",
    "rawSpec": "^3.2.5",
    "spec": ">=3.2.5 <4.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/bug-killer"
  ],
  "_resolved": "https://registry.npmjs.org/ansi-parser/-/ansi-parser-3.2.8.tgz",
  "_shasum": "ad80a6351ac5e58cc7e8a761abc037b5505041d0",
  "_shrinkwrap": null,
  "_spec": "ansi-parser@^3.2.5",
  "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/bug-killer",
  "author": {
    "name": "Ionică Bizău",
    "email": "bizauionica@gmail.com",
    "url": "https://ionicabizau.net"
  },
  "bugs": {
    "url": "https://github.com/IonicaBizau/node-ansi-parser/issues"
  },
  "contributors": [
    {
      "name": "Unihedron",
      "email": "vyfcalt@gmail.com"
    },
    {
      "name": "Jongware http://stackoverflow.com/users/2564301/jongware"
    }
  ],
  "dependencies": {},
  "description": "Parse strings containing ANSI style characters.",
  "devDependencies": {
    "couleurs": "5.0.0"
  },
  "directories": {
    "test": "test"
  },
  "dist": {
    "shasum": "ad80a6351ac5e58cc7e8a761abc037b5505041d0",
    "tarball": "https://registry.npmjs.org/ansi-parser/-/ansi-parser-3.2.8.tgz"
  },
  "files": [
    "bin/",
    "app/",
    "lib/",
    "dist/",
    "src/",
    "scripts/",
    "resources/",
    "menu/",
    "cli.js",
    "index.js",
    "bloggify.js",
    "bloggify.json",
    "bloggify/"
  ],
  "gitHead": "c92932bdd6654796ceb56f63ca11c4e6fcf9ba6e",
  "homepage": "https://github.com/IonicaBizau/node-ansi-parser",
  "keywords": [
    "ansi",
    "parser"
  ],
  "license": "MIT",
  "main": "lib/index.js",
  "maintainers": [
    {
      "name": "ionicabizau",
      "email": "bizauionica@yahoo.com"
    }
  ],
  "name": "ansi-parser",
  "optionalDependencies": {},
  "readme": "<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->\n\n\n# ansi-parser\n\n [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/ansi-parser.svg)](https://www.npmjs.com/package/ansi-parser) [![Downloads](https://img.shields.io/npm/dt/ansi-parser.svg)](https://www.npmjs.com/package/ansi-parser)\n\n> Parse strings containing ANSI style characters.\n\n## :cloud: Installation\n\n```sh\n$ npm i --save ansi-parser\n```\n\n\n## :clipboard: Example\n\n\n\n```js\n// Dependencies\nvar AnsiParser = require(\"ansi-parser\");\n\n// Parse the ANSI input\nconsole.log(AnsiParser.parse(\"\\u001b[1m\\u001b[38;5;231mHello\\u001b[0m\\u001b[22m World\"));\n// [\n//   {\n//       style: \"\\u00\\u001b[1m\\u001b[38;5;231\",\n//       content: \"H\"\n//   },\n//   {\n//      style: \"\\u00\\u001b[1m\\u001b[38;5;231\",\n//      content: \"e\"\n//   },\n//   ...\n// ]\n\n// Remove ANSI styles\nconsole.log(AnsiParser.removeAnsi(\"\\u001b[1m\\u001b[38;5;231mHello\\u001b[0m\\u001b[22m World\"));\n// => \"Hello World\"\n```\n\n\n\n## :question: Get Help\n\nThere are few ways to get help:\n\n 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.\n 2. For bug reports and feature requests, open issues. :bug:\n 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:\n\n\n## :memo: Documentation\n\n\n### `parse(input)`\nParses the string containing ANSI styles.\n\n#### Params\n\n- **String** `input`: The input string.\n\n#### Return\n- **Array** An array of object like below:\n\n   ```js\n   [\n     {\n         style: \"\\u00\\u001b[1m\\u001b[38;5;231\",\n         content: \"H\"\n     },\n     {\n        style: \"\\u00\\u001b[1m\\u001b[38;5;231\",\n        content: \"e\"\n     },\n     ...\n   ]\n   ```\n\n### `getAtIndex(input, noAnsi, index)`\nReturns the content and ANSI style at known index.\n\n#### Params\n\n- **String** `input`: The input string.\n- **String** `noAnsi`: The input string without containing ansi styles.\n- **Number** `index`: The character index.\n\n#### Return\n- **Object** An object containing the following fields:\n - `style` (String): The ANSI style at provided index.\n - `content` (String): The content (character) at provided index.\n\n### `removeAnsi(input)`\nRemoves ANSI styles from the input string.\n\n#### Params\n\n- **String** `input`: The input string.\n\n#### Return\n- **String** The string without ANSI styles.\n\n### `stringify(arr)`\nStringifies an array of objects in the format defined by `AnsiParser`.\n\n#### Params\n\n- **Array** `arr`: The input array.\n\n#### Return\n- **String** The stringified input array.\n\n### `addChar(arr, c, s, e)`\nAdds a new char into array.\n\n#### Params\n\n- **Array** `arr`: The input array.\n- **String** `c`: The char to add.\n- **String** `s`: ANSI start style.\n- **String** `e`: ANSI end style.\n\n\n\n## :yum: How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n## :sparkling_heart: Support my projects\n\nI open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,\nthis takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).\n\nHowever, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:\n\n - Starring and sharing the projects you like :rocket:\n - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:\n - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:\n - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).\n - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`\n\n    ![](https://i.imgur.com/z6OQI95.png)\n\nThanks! :heart:\n\n\n## :dizzy: Where is this library used?\nIf you are using this library in one of your projects, add it in this list. :sparkles:\n\n\n - [`bug-killer`](https://github.com/IonicaBizau/node-bug-killer)—Simple way to log messages in stdout or other stream.\n - [`cli-box`](https://github.com/IonicaBizau/node-cli-box)—A library to generate ASCII boxes via NodeJS\n - [`cli-cal`](https://github.com/fnogatz/cli-cal) (by Falco Nogatz)—Github-like calendar graph for the CLI\n - [`cli-gh-cal`](https://github.com/IonicaBizau/cli-gh-cal)—GitHub like calendar graphs in command line.\n - [`cute-logger`](https://github.com/IonicaBizau/cute-logger)—Simple way to log messages in stdout or other stream.\n - [`ghcal`](https://github.com/IonicaBizau/ghcal)—See the GitHub contributions calendar of a user in the command line.\n - [`github-stats`](https://github.com/IonicaBizau/github-stats)—Visualize stats about GitHub users and projects in your terminal.\n - [`idea`](https://github.com/IonicaBizau/idea)—A lightweight CLI tool and module for keeping ideas in a safe place quick and easy.\n - [`jupyter-dashboards-server`](https://github.com/jupyter-incubator/dashboards_server#readme) (by Jupyter Development Team)—Serves Jupyter notebooks as standalone dashboards\n - [`kyso-cloud-dashboard`](https://npmjs.com/package/kyso-cloud-dashboard)—```bash PORT=8000 TARGET_DIR='/Users/eoinmurray/dashboard-http/' BASE_URL='/xyz' kyso-cloud-dashboard ```\n - [`le-table`](https://github.com/IonicaBizau/le-table)—Another NodeJS module for creating ASCII tables.\n - [`overlap`](https://github.com/IonicaBizau/node-overlap)—Overlap two strings that contain new lines. Useful for ASCII drawings.\n - [`tilda`](https://github.com/IonicaBizau/tilda)—Tiny module for building command line tools.\n\n## :scroll: License\n\n[MIT][license] © [Ionică Bizău][website]\n\n[badge_patreon]: http://ionicabizau.github.io/badges/patreon.svg\n[badge_amazon]: http://ionicabizau.github.io/badges/amazon.svg\n[badge_paypal]: http://ionicabizau.github.io/badges/paypal.svg\n[badge_paypal_donate]: http://ionicabizau.github.io/badges/paypal_donate.svg\n[patreon]: https://www.patreon.com/ionicabizau\n[amazon]: http://amzn.eu/hRo9sIZ\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW\n[donate-now]: http://i.imgur.com/6cMbHOC.png\n\n[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(https%3A%2F%2Fionicabizau.net)&year=2014#license-mit\n[website]: https://ionicabizau.net\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/IonicaBizau/node-ansi-parser.git"
  },
  "scripts": {
    "test": "node test/index.js"
  },
  "version": "3.2.8"
}
