{"name":"yoctocolors","version":"0.1.0","description":"The smallest and fastest command-line coloring package on the internet. Trust me.","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","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"ava":"^3.15.0","xo":"^0.44.0"},"gitHead":"bbd85df0b35f66b7cb4f0edfaede50b1c6069832","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@0.1.0","_nodeVersion":"16.9.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-yjR3EKNyCDJv1YUM6/qmQA4MvnXI0THeD3LBNfs4+DuO5sX2F517wdWQqzE65kal9IqSIVAxX75sMLwNfIjo2g==","shasum":"8f1caffb4de7c0718d173d4ffcd0b21da09e1464","tarball":"http://registry-npm.ywwl.com/yoctocolors/download/yoctocolors-0.1.0.tgz","fileCount":4,"unpackedSize":4911,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6BZENSwYNlVbL8e7xFoN09Dze5ybz1UNKkIuJ1En4KAiBlAqM6cgNQvdaG6tBiHjum/1QfLMO6xBA4iSv7O5SQnQ=="}],"size":2355,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-0.1.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_0.1.0_1633073703760_0.9688337544361993"},"_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":1633073703922,"_cnpm_publish_time":1633073703922,"dist-tags":{"latest":"2.2.0"}}