{"name":"yoctocolors","version":"1.0.0","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.0","ansi-colors":"^4.1.3","ava":"^4.3.0","chalk":"^5.0.1","cli-color":"^2.0.2","colorette":"^2.0.19","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.0","tsd":"^0.22.0","xo":"^0.50.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"gitHead":"d3e66238e5944e09ee1496fe98a8dbcb37ae3911","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@1.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.2","dist":{"integrity":"sha512-qJNAmSF77lWjfRVwCZK3PcKYWrr+55RUQTiXDxXHGbxzf8WuuRgftIB3hqZ5fykjOF/MC62cazsG/2ZDBedOnQ==","shasum":"6f6dd95d736adade55ff1eaf89aa737df1b69c94","tarball":"http://registry-npm.ywwl.com/yoctocolors/download/yoctocolors-1.0.0.tgz","fileCount":5,"unpackedSize":7599,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx2fVYRswmB92QPBLOcwnJAO69HVoL3wDATCRnkHzhjAIgOJ5ToLznYrTnzqmDZhuXZys4JzgCwM0iSlgvORkBZew="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivjKxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVwQ//c17R7zjW4fXhs21VvF6dWBd9dNWqRCzO3hfQgwWeJ1bWqtQh\r\nlMXdLgx0sAJ2LXYw2W3d+TDqdvlqT5kyEcskBUrAhmOR0blVMlrvbvgrzlQO\r\nYannlQY5+91ylK5GCpwXVgxVDH427E2b7zgik+fNJWOO9D0pPeMNre1F79U9\r\n4WwLr4ew3UbWFCzSf06j23NnltvGiThJ/z5AOAigdaqViJLcfUUge1jUcFJE\r\ngSxibnbCFu79L+ZXvF4t1Y8eTwKGERMbSSas+C7/KQKoxjgLV3Zr8nGTfSxo\r\nBlBABR0jPIc3QzIt/jaPtplM9X//aTTH2Iu0pmVj8tJaOs0DPdhjuGiJt6cp\r\nXOl7W7gOhf5uPoDcClLgtS4SmMq4LvA7FYbC+fLK/wSOQsuIl/X40JqWTHML\r\nFuL4hhDcbYc2iqIrSwk0VFK8JhnUF6Lv+gWxLdvGS1S4J4z4DJJu9ODBxrsC\r\nEZS6/oMDDljbwIkHC+wg2BuYR1aRVDMOQ/hsVMFUKGzH+7Dey+gy/xBcDRI5\r\nY51SG3qk3qRO/pVR61FCu+fsqPOZ6YPIjaEPVqLXv6Hp0WySvbv5j9Kwyk+t\r\nY6EaBZhQZLC6tX2FpF9+i3tnvw9mwTB2b8tgg9Eo46oyPZ5nMYM/tWXL/dtf\r\nbDLDe8ZZ8TqPqOPHAyprzfnZrp4FgcEw11U=\r\n=71rt\r\n-----END PGP SIGNATURE-----\r\n","size":3162,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_1.0.0_1656631985693_0.5054662161155177"},"_hasShrinkwrap":false,"readme":"<sup>yoctocolors 🌈</sup>\n\n> The smallest and fastest command-line coloring package on the internet\n\n*Check out [Chalk](https://github.com/chalk/chalk) if you want something more mature and comprehensive.*\n\n## Highlights\n\n- Tiny\n- Fast\n- Handles nested colors\n- Tree-shakeable\n- No dependencies\n- Actively maintained\n\n## Install\n\n```sh\nnpm install yoctocolors\n```\n\n## Usage\n\n```js\nimport * as colors from 'yoctocolors';\n\nconsole.log(colors.red('Yo!'));\n\nconsole.log(colors.blue(`Welcome to the ${colors.green('yoctocolors')} package!`));\n```\n\n*This package supports [basic color detection](https://nodejs.org/api/tty.html#writestreamhascolorscount-env). Colors can be forcefully enabled by setting the `FORCE_COLOR` environment variable to `1` and can be forcefully disabled by setting `NO_COLOR` or `NODE_DISABLE_COLORS` to any value. [More info.](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv)*\n\n## Styles\n\n### Modifiers\n\n- `reset` - Reset the current style.\n- `bold` - Make the text bold.\n- `dim` - Make the text have lower opacity.\n- `italic` - Make the text italic. *(Not widely supported)*\n- `underline` - Put a horizontal line above the text. *(Not widely supported)*\n- `overline` - Put a horizontal line below the text. *(Not widely supported)*\n- `inverse`- Invert background and foreground colors.\n- `hidden` - Print the text but make it invisible.\n- `strikethrough` - Put a horizontal line through the center of the text. *(Not widely supported)*\n\n### Colors\n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n- `redBright`\n- `greenBright`\n- `yellowBright`\n- `blueBright`\n- `magentaBright`\n- `cyanBright`\n- `whiteBright`\n\n### Background colors\n\n- `bgBlack`\n- `bgRed`\n- `bgGreen`\n- `bgYellow`\n- `bgBlue`\n- `bgMagenta`\n- `bgCyan`\n- `bgWhite`\n- `bgGray`\n- `bgRedBright`\n- `bgGreenBright`\n- `bgYellowBright`\n- `bgBlueBright`\n- `bgMagentaBright`\n- `bgCyanBright`\n- `bgWhiteBright`\n\n## Prior art\n\nYes\n\n## Benchmark\n\n```sh\n$ ./benchmark.js\n┌─────────┬────────────────┬─────────────┐\n│ (index) │ library        │ ops/sec     │\n├─────────┼────────────────┼─────────────┤\n│ 0       │ 'yoctocolors'  │ '8,000,000' │\n│ 1       │ 'colorette'    │ '8,000,000' │\n│ 2       │ 'picocolors'   │ '8,000,000' │\n│ 3       │ 'nanocolors'   │ '5,988,024' │\n│ 4       │ 'chalk'        │ '4,807,692' │\n│ 5       │ 'kleur/colors' │ '4,807,692' │\n│ 6       │ 'kleur'        │ '4,784,689' │\n│ 7       │ 'ansi-colors'  │ '2,178,649' │\n│ 8       │ 'cli-color'    │ '585,138'   │\n└─────────┴────────────────┴─────────────┘\n```\n\n*See [benchmark.js](benchmark.js).*\n\n## FAQ\n\n### What is yocto?\n\n[It was the smallest official unit prefix in the metric system until 2022.](https://en.wikipedia.org/wiki/Yocto-) Much smaller than nano.\n\n## Related\n\n- [yoctodelay](https://github.com/sindresorhus/yoctodelay) - Delay a promise a given amount of time\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling\n","publish_time":1656631985884,"_cnpm_publish_time":1656631985884,"dist-tags":{"latest":"2.2.0"}}