{"name":"@npmcli/disparity-colors","version":"1.0.1","keywords":["disparity","npm","npmcli","diff","char","unified","multiline","string","color","ansi","terminal","cli","tty"],"author":{"name":"npm Inc.","email":"support@npmjs.com"},"license":"ISC","_id":"@npmcli/disparity-colors@1.0.1","maintainers":[{"name":"gar","email":"gar+npm@danger.computer"},{"name":"isaacs","email":"i@izs.me"},{"name":"darcyclarke","email":"darcy@darcyclarke.me"},{"name":"ruyadorno","email":"ruyadorno@hotmail.com"},{"name":"nlf","email":"quitlahok@gmail.com"}],"contributors":[{"url":"https://ruyadorno.com","name":"Ruy Adorno"}],"homepage":"https://github.com/npm/disparity-colors#readme","bugs":{"url":"https://github.com/npm/disparity-colors/issues"},"tap":{"check-coverage":true},"dist":{"shasum":"b23c864c9658f9f0318d5aa6d17986619989535c","tarball":"http://registry-npm.ywwl.com/@npmcli/disparity-colors/download/@npmcli/disparity-colors-1.0.1.tgz","fileCount":5,"integrity":"sha512-kQ1aCTTU45mPXN+pdAaRxlxr3OunkyztjbbxDY/aIcPS5CnCUrx+1+NvA6pTcYR7wmLZe37+Mi5v3nfbwPxq3A==","signatures":[{"sig":"MEYCIQCIPklrklNMJamM/34HMlGsNZGuIR0EGSilHDr8XHde7QIhAIAr8CZMWidNCUjf5rdB7UaQ74Yyy5octo3Oc0dtkKH8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/hQJCRA9TVsSAnZWagAAU5YP/A9rumChpnsRzb679Kl7\nUXmcPbWnMt38Kw2IRAZIhQyMXlU14jJwnKJZaQrz98r8FhwTYUNI8HqlVA/i\nWPrrs/zWSlnIc+Ou9mpBMWqpIUG9agCpVBpdNDKK/ZuKqMUaAQnKIl+5Q+mx\n4uGFNVVLAITpnwiZIk5EVcPfQjdQfIlVgXgLKDLEdLuVaKWeJSLRn7HcZXLg\nYjrWSwC8I1HG0Xz6AU/Dv+fUmTkY5rdh5L5RMeTugMrtaZqp+cVGHtGjrPIh\nGGi+44nW9pl/RnAQZLqNSQvNqq7QwayVJZZTh9yjvsNald/rLA/m4Od5eKSy\nMkR+chZmmleN0/wNLbpWvjTBL1uSTv25rv2ZO1thhFKlB8reSm8dFAE1cBem\nZcKQdkvVMud21IGPyYIQ2i7J7UOsQNVuhUo+iyUeCptRxXozyjMKfUNrMOOy\n1/wCdT/JedFF2rrmRU32ckd5D54r1q6TxVYo2WWBERQmA/dFvk7fNw/+VBrX\nIQhD5B5KckJqlcrbxGgU4FftTFkAaeDvXq4NDtdWs3MXUl1/qZyj5jsQ5FtP\n3R4TI40xvLM98bkKyFY7VlD4B7cS3zoD4vx8tBgX5W4/+S7ESez+mJlJ3/sS\nRYvo89ST4hEKulmg6npQLecyx/M1wZN8mBP/8/8MZprgb0o0x7ShCp0vaAma\nOZiq\r\n=kzMw\r\n-----END PGP SIGNATURE-----\r\n","size":2253,"noattachment":false,"key":"/@npmcli/disparity-colors/-/@npmcli/disparity-colors-1.0.1.tgz"},"engines":{"node":">=10"},"gitHead":"c9b8fed6e2bb56e3f0076b061b50ff542dd63f59","scripts":{"lint":"standard index.js","snap":"tap","test":"tap","pretest":"npm run lint","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"ruyadorno","email":"ruyadorno@hotmail.com"},"standard":{"ignore":["/tap-snapshots/"]},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/disparity-colors.git","type":"git"},"_npmVersion":"7.4.0","description":"Colorizes unified diff output","directories":{},"_nodeVersion":"16.0.0-pre","dependencies":{"ansi-styles":"^4.3.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^14.11.0","standard":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/disparity-colors_1.0.1_1610486793421_0.43366665736118604","host":"s3://npm-registry-packages"},"readme":"# @npmcli/disparity-colors\n\n[![NPM version](https://img.shields.io/npm/v/@npmcli/disparity-colors)](https://www.npmjs.com/package/@npmcli/disparity-colors)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/npm/disparity-colors/ci.yml?branch=main)](https://github.com/npm/disparity-colors)\n[![License](https://img.shields.io/github/license/npm/disparity-colors)](https://github.com/npm/disparity-colors/blob/master/LICENSE)\n\nSpiritual sucessor to [disparity](https://www.npmjs.com/package/disparity). Colorizes [Diff Unified format](https://en.wikipedia.org/wiki/Diff#Unified_format) output using [ansi-styles](https://www.npmjs.com/package/ansi-styles).\n\n## Install\n\n`npm install @npmcli/disparity-colors`\n\n## Usage:\n\n```js\nconst colorize = require('@npmcli/disparity-colors')\nmapWorkspaces(`--- a/src/index.js\n+++ b/src/index.js\n@@ -1,4 +1,5 @@\n \"use strict\";\n+\"use foo\";\n\n const os = require(\"os\");\n`)\n// \u001b[33m--- a/src/index.js\u001b[39m\n// \u001b[33m+++ b/src/index.js\u001b[39m\n// \u001b[35m@@ -1,4 +1,5 @@\u001b[39m\n// \"use strict\";\n// \u001b[32m+\"use foo\";\u001b[39m\n// \n// const os = require(\"os\");\n```\n\n## API:\n\n### `colorize(str, opts = {}) -> String`\n\n- `str`: A [Diff Unified format](https://en.wikipedia.org/wiki/Diff#Unified_format) string\n- `opts`:\n  - `headerLength`: A **Number** defining how many lines should be colorized as header\n\n#### Returns\n\nA **String** including the appropriate [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)\n\n## LICENSE\n\n[ISC](./LICENSE)\n\n","publish_time":1610486793550,"_cnpm_publish_time":1610486793550,"dist-tags":{"latest":"3.0.1"}}