{"name":"is-interactive","version":"0.1.0","description":"Check if stdout or stderr is interactive","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-interactive.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["interactive","stdout","stderr","detect","is","terminal","shell","tty"],"devDependencies":{"@types/node":"^12.0.12","ava":"^2.1.0","tsd":"^0.7.3","xo":"^0.24.0"},"gitHead":"2db313384f144af046d58ba6e1f475ee5bfb5231","bugs":{"url":"https://github.com/sindresorhus/is-interactive/issues"},"homepage":"https://github.com/sindresorhus/is-interactive#readme","_id":"is-interactive@0.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-LbJ+XBnFVtLsfN1igC67fKOpfGfZoWdtDSLa0/tqastCoAJPGv6xqWLDuIBNL7Cx35hpItVo2dR8etfsd8rU8A==","shasum":"5e22ca82df5f16c175d0da6da72efb7bb698e33a","tarball":"http://registry-npm.ywwl.com/is-interactive/download/is-interactive-0.1.0.tgz","fileCount":5,"unpackedSize":4626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIMgyCRA9TVsSAnZWagAArCcP/jvD4FNjYL18mwJMG1zg\nQN43/gvYQNqTqcClkeC1ZYR/T3Edr91Mt4cwidSY0tCpm9hJAJ5afrK4cnVK\naRZWO+Yb0xa7GmpV5P370JqZVC7rLqvLzMNJ+T7V1niQhozG/LFzJHwW69xf\nhv+Yo/OJ+nZN+6y07GuG/5KN4uLn27kJyWopbJtvFwdnPjZCWr/wwW48zgmW\nAdUQtfD7BZuTrDiXc2uCArFYNF/RQS5RXJuzT1JKl9Ox0uZZIW2QvINzs8/L\nRu8+5yxfIK3SKm/rNA5rRpLflDDfyyPrg1dchZaap9j6FY8SShibfRzN0bcH\n7FUrRHp/EWzMFsHZqiZM64I4kbwQsf5MEZ4aqFy34jNT1M8NXdLP+5zINNgl\nBmO/9tp38325H8AOMk/wLIWGOI4oIA2fgW++nr2p4zzMeDkU7kLNfFc3ZOlh\npsZvIb6cAnnsH4dkWxeNnYlTGUsnp41JNSmJGN2mBeldzWfHdMEq0q8hZHBQ\nzk0zzObGrKU4+134WL2gIXTmUTI+ihBM8Be+tBw1MHAYbfJAQZqTyxws3Q7h\ntiCHE+EaYzEO4/nx4FHWGgsc0gSzilEWYEcXYssNOp/ii7MBJHFdu+g82p3l\nacAUgp6+asa+HAY+/c/OK/YGiNYr4W6j4jDRnSD0j1sWHL6j19QQQAfSi3OF\nDrxz\r\n=qoyR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9o6whYSzzBk+8dtsqyS0mnLhPU5z4Z4wqEtbxZzUP5AiEAuD9P7oMcofk8ifdsxXzJVnR0hYV8H0R0CozjFQ2YXHI="}],"size":2413,"noattachment":false,"key":"/is-interactive/-/is-interactive-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-interactive_0.1.0_1562429490289_0.8728947227792072"},"_hasShrinkwrap":false,"readme":"# is-interactive\n\n> Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678)\n\nIt checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.\n\nThis can be useful to decide whether to present interactive UI or animations in the terminal.\n\n## Install\n\n```\n$ npm install is-interactive\n```\n\n## Usage\n\n```js\nimport isInteractive from 'is-interactive';\n\nisInteractive();\n//=> true\n```\n\n## API\n\n### isInteractive(options?)\n\n#### options\n\nType: `object`\n\n##### stream\n\nType: [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable)\\\nDefault: [`process.stdout`](https://nodejs.org/api/process.html#process_process_stdout)\n\nThe stream to check.\n\n## FAQ\n\n#### Why are you not using [`ci-info`](https://github.com/watson/ci-info) for the CI check?\n\nIt's silly to have to detect individual CIs. They should identify themselves with the `CI` environment variable, and most do just that. A manually maintained list of detections will easily get out of date. And if a package using `ci-info` doesn't update to the latest version all the time, they will not support certain CIs. It also creates unpredictability as you might assume a CI is not supported and then suddenly it gets supported and you didn't account for that. In addition, some of the manual detections are loose and might cause false-positives which could create hard-to-debug bugs.\n\n#### Why does this even exist? It's just a few lines.\n\nIt's not about the number of lines, but rather discoverability and documentation. A lot of people wouldn't even know they need this. Feel free to copy-paste the code if you don't want the dependency. You might also want to read [this blog post](https://blog.sindresorhus.com/small-focused-modules-9238d977a92a).\n\n## Related\n\n- [is-unicode-supported](https://github.com/sindresorhus/is-unicode-supported) - Detect whether the terminal supports Unicode\n- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color\n","publish_time":1562429490421,"_cnpm_publish_time":1562429490421,"dist-tags":{"latest":"2.0.0"}}