layaair2-cmd
Version:
layaair version 2 toolkit
110 lines (109 loc) • 7.63 kB
JSON
{
"_args": [
[
{
"raw": "color-support@^1.1.3",
"scope": null,
"escapedName": "color-support",
"name": "color-support",
"rawSpec": "^1.1.3",
"spec": ">=1.1.3 <2.0.0",
"type": "range"
},
"E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\fancy-log"
]
],
"_from": "color-support@>=1.1.3 <2.0.0",
"_id": "color-support@1.1.3",
"_inCache": true,
"_location": "/color-support",
"_nodeVersion": "8.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/color-support-1.1.3.tgz_1496781653952_0.28517320565879345"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"_npmVersion": "5.0.3",
"_phantomChildren": {},
"_requested": {
"raw": "color-support@^1.1.3",
"scope": null,
"escapedName": "color-support",
"name": "color-support",
"rawSpec": "^1.1.3",
"spec": ">=1.1.3 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/fancy-log"
],
"_resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
"_shasum": "93834379a1cc9a0c61f82f52f0d04322251bd5a2",
"_shrinkwrap": null,
"_spec": "color-support@^1.1.3",
"_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\fancy-log",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bin": {
"color-support": "bin.js"
},
"browser": "browser.js",
"bugs": {
"url": "https://github.com/isaacs/color-support/issues"
},
"dependencies": {},
"description": "A module which will endeavor to guess your terminal's level of color support.",
"devDependencies": {
"tap": "^10.3.3"
},
"directories": {},
"dist": {
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
"shasum": "93834379a1cc9a0c61f82f52f0d04322251bd5a2",
"tarball": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz"
},
"files": [
"browser.js",
"index.js",
"bin.js"
],
"gitHead": "41d86ea5525fcd56765eb0067f1434b2ed5aec81",
"homepage": "https://github.com/isaacs/color-support#readme",
"keywords": [
"terminal",
"color",
"support",
"xterm",
"truecolor",
"256"
],
"license": "ISC",
"main": "index.js",
"maintainers": [
{
"name": "isaacs",
"email": "i@izs.me"
}
],
"name": "color-support",
"optionalDependencies": {},
"readme": "# color-support\n\nA module which will endeavor to guess your terminal's level of color\nsupport.\n\n[](https://travis-ci.org/isaacs/color-support) [](https://coveralls.io/github/isaacs/color-support?branch=master)\n\nThis is similar to `supports-color`, but it does not read\n`process.argv`.\n\n1. If not in a node environment, not supported.\n\n2. If stdout is not a TTY, not supported, unless the `ignoreTTY`\n option is set.\n\n3. If the `TERM` environ is `dumb`, not supported, unless the\n `ignoreDumb` option is set.\n\n4. If on Windows, then support 16 colors.\n\n5. If using Tmux, then support 256 colors.\n\n7. Handle continuous-integration servers. If `CI` or\n `TEAMCITY_VERSION` are set in the environment, and `TRAVIS` is not\n set, then color is not supported, unless `ignoreCI` option is set.\n\n6. Guess based on the `TERM_PROGRAM` environ. These terminals support\n 16m colors:\n\n - `iTerm.app` version 3.x supports 16m colors, below support 256\n - `MacTerm` supports 16m colors\n - `Apple_Terminal` supports 256 colors\n - Have more things that belong on this list? Send a PR!\n\n8. Make a guess based on the `TERM` environment variable. Any\n `xterm-256color` will get 256 colors. Any screen, xterm, vt100,\n color, ansi, cygwin, or linux `TERM` will get 16 colors.\n\n9. If `COLORTERM` environment variable is set, then support 16 colors.\n\n10. At this point, we assume that color is not supported.\n\n## USAGE\n\n```javascript\nvar testColorSupport = require('color-support')\nvar colorSupport = testColorSupport(/* options object */)\n\nif (!colorSupport) {\n console.log('color is not supported')\n} else if (colorSupport.has16m) {\n console.log('\\x1b[38;2;102;194;255m16m colors\\x1b[0m')\n} else if (colorSupport.has256) {\n console.log('\\x1b[38;5;119m256 colors\\x1b[0m')\n} else if (colorSupport.hasBasic) {\n console.log('\\x1b[31mbasic colors\\x1b[0m')\n} else {\n console.log('this is impossible, but colors are not supported')\n}\n```\n\nIf you don't have any options to set, you can also just look at the\nflags which will all be set on the test function itself. (Of course,\nthis doesn't return a falsey value when colors aren't supported, and\ndoesn't allow you to set options.)\n\n```javascript\nvar colorSupport = require('color-support')\n\nif (colorSupport.has16m) {\n console.log('\\x1b[38;2;102;194;255m16m colors\\x1b[0m')\n} else if (colorSupport.has256) {\n console.log('\\x1b[38;5;119m256 colors\\x1b[0m')\n} else if (colorSupport.hasBasic) {\n console.log('\\x1b[31mbasic colors\\x1b[0m')\n} else {\n console.log('colors are not supported')\n}\n```\n\n## Options\n\nYou can pass in the following options.\n\n* ignoreTTY - default false. Ignore the `isTTY` check.\n* ignoreDumb - default false. Ignore `TERM=dumb` environ check.\n* ignoreCI - default false. Ignore `CI` environ check.\n* env - Object for environment vars. Defaults to `process.env`.\n* stream - Stream for `isTTY` check. Defaults to `process.stdout`.\n* term - String for `TERM` checking. Defaults to `env.TERM`.\n* alwaysReturn - default false. Return an object when colors aren't\n supported (instead of returning `false`).\n* level - A number from 0 to 3. This will return a result for the\n specified level. This is useful if you want to be able to set the\n color support level explicitly as a number in an environment\n variable or config, but then use the object flags in your program.\n Except for `alwaysReturn` to return an object for level 0, all other\n options are ignored, since no checking is done if a level is\n explicitly set.\n\n## Return Value\n\nIf no color support is available, then `false` is returned by default,\nunless the `alwaysReturn` flag is set to `true`. This is so that the\nsimple question of \"can I use colors or not\" can treat any truthy\nreturn as \"yes\".\n\nOtherwise, the return object has the following fields:\n\n* `level` - A number from 0 to 3\n * `0` - No color support\n * `1` - Basic (16) color support\n * `2` - 256 color support\n * `3` - 16 million (true) color support\n* `hasBasic` - Boolean\n* `has256` - Boolean\n* `has16m` - Boolean\n\n## CLI\n\nYou can run the `color-support` bin from the command line which will\njust dump the values as this module calculates them in whatever env\nit's run. It takes no command line arguments.\n\n## Credits\n\nThis is a spiritual, if not actual, fork of\n[supports-color](http://npm.im/supports-color) by the ever prolific\n[Sindre Sorhus](http://npm.im/~sindresorhus).\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/color-support.git"
},
"scripts": {
"postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
"preversion": "npm test",
"test": "tap test/*.js --100 -J"
},
"version": "1.1.3"
}