{"_id":"is-interactive","_rev":"171811","name":"is-interactive","description":"Check if stdout or stderr is interactive","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2022-10-18T11:05:46.000Z","created":"2019-07-06T16:11:30.421Z","2.0.0":"2021-05-03T20:19:09.981Z","1.0.0":"2019-07-21T15:31:23.890Z","0.1.0":"2019-07-06T16:11:30.421Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-interactive.git"},"versions":{"2.0.0":{"name":"is-interactive","version":"2.0.0","description":"Check if stdout or stderr is interactive","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-interactive.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"},"scripts":{"test":"xo && ava && tsd"},"keywords":["interactive","stdout","stderr","detect","is","terminal","shell","tty"],"devDependencies":{"@types/node":"^15.0.1","ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"gitHead":"0001ea8ec644168c0f3567f355c608a346aecddd","bugs":{"url":"https://github.com/sindresorhus/is-interactive/issues"},"homepage":"https://github.com/sindresorhus/is-interactive#readme","_id":"is-interactive@2.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"40c57614593826da1100ade6059778d597f16e90","size":2391,"noattachment":false,"key":"/is-interactive/-/is-interactive-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/is-interactive/download/is-interactive-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-interactive_2.0.0_1620073149866_0.8395475468833107"},"_hasShrinkwrap":false,"publish_time":1620073149981,"_cnpm_publish_time":1620073149981},"1.0.0":{"name":"is-interactive","version":"1.0.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":"b4b4bda46dc6a5c5b8e347b2561fd3625a927f8d","bugs":{"url":"https://github.com/sindresorhus/is-interactive/issues"},"homepage":"https://github.com/sindresorhus/is-interactive#readme","_id":"is-interactive@1.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cea6e6ae5c870a7b0a0004070b7b587e0252912e","size":2412,"noattachment":false,"key":"/is-interactive/-/is-interactive-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/is-interactive/download/is-interactive-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-interactive_1.0.0_1563723083759_0.9837731888386234"},"_hasShrinkwrap":false,"publish_time":1563723083890,"_cnpm_publish_time":1563723083890},"0.1.0":{"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":{"shasum":"5e22ca82df5f16c175d0da6da72efb7bb698e33a","size":2413,"noattachment":false,"key":"/is-interactive/-/is-interactive-0.1.0.tgz","tarball":"http://name.csiicloud.com:7001/is-interactive/download/is-interactive-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-interactive_0.1.0_1562429490289_0.8728947227792072"},"_hasShrinkwrap":false,"publish_time":1562429490421,"_cnpm_publish_time":1562429490421}},"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","_attachments":{},"homepage":"https://github.com/sindresorhus/is-interactive#readme","bugs":{"url":"https://github.com/sindresorhus/is-interactive/issues"},"license":"MIT"}