{ "name": "chalk", "version": "0.5.0", "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/sindresorhus/chalk" }, "maintainers": [ { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, { "name": "Joshua Appelman", "email": "joshua@jbna.nl" } ], "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha", "bench": "matcha benchmark.js" }, "files": [ "index.js" ], "keywords": [ "color", "colour", "colors", "terminal", "console", "cli", "string", "ansi", "styles", "tty", "formatting", "rgb", "256", "shell", "xterm", "log", "logging", "command-line", "text" ], "dependencies": { "ansi-styles": "^1.1.0", "escape-string-regexp": "^1.0.0", "has-ansi": "^0.1.0", "strip-ansi": "^0.3.0", "supports-color": "^0.2.0" }, "devDependencies": { "matcha": "^0.5.0", "mocha": "*" }, "readme": "# \"chalk\"\n\n> Terminal string styling done right\n\n[![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk)\n![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](https://github.com/sindresorhus/ansi-styles/raw/master/screenshot.png)\n\n\n## Why\n\n- Highly performant\n- Doesn't extend String.prototype\n- Expressive API\n- Ability to nest styles\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 1000+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\n```sh\n$ npm install --save chalk\n```\n\n\n## Usage\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// nest styles of the same type even (color, underline, background)\nconsole.log( chalk.green('I am a green line ' + chalk.blue('with a blue substring') + ' that becomes green again!') );\n```\n\nEasily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\nTake advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).\n\n```js\nvar name = 'Sindre';\nconsole.log(chalk.green('Hello %s'), name);\n//=> Hello Sindre\n```\n\n\n## API\n\n### chalk.`