{"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":{"integrity":"sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==","shasum":"40c57614593826da1100ade6059778d597f16e90","tarball":"http://registry-npm.ywwl.com/is-interactive/download/is-interactive-2.0.0.tgz","fileCount":5,"unpackedSize":4726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFq+CRA9TVsSAnZWagAAD8EP/0OZAmAUJOfDHY26nj2B\nELNtvd2KQ+8YTu4BNYSGhwp235+DsFqxW+BBdi2K152UIckSxeQmKzGKTcVJ\nBbZzXK2vubZRzWCX41WtIPXuDBZlxlitMN9YE8kJyJTDdEWJe5r7KlAxjSuX\nK9z+kpI6UKxoLXhQPoJjCKwvW1LABs1ZdsFNNhm2us1mn9OhKDEN/eQ/URCQ\nzEA4MR2/UQseFGY8QD0UhwXJOdinXsMa/7FCGsC8ITadWP+iJbOyuwOIDLl4\nTCqUnUOvVXp49vWqbGe08+rjERALIYwmiqTPGXbNK7KnQgJtpbNvdI4kzFMX\ngb3hw/Qtlt6RbTPGXBuXwTrQIo4PpjEX4Bx0VpDBdBwo12aLqTi8wZ+MLD7s\nCiZVc+NYq/hvtc2LOq3dkuqdQs7agpY9XVchiOzyB+z9aSi7YwDmoBgM42KG\nq8ReIGfJezoUH1D1iWUvTLCkq/hMIA82L12bxTZT7zlk531NeOR5U0Oz/XPo\n48mg2lwOIf454TcMhTk4yMyH9Ju+PJZNi7JsJuVOnAYvnXUx/IunYCdbPa+6\nUwUbG7Gg6Fbw/fqME55ENIWbjST+8qBMEyyjUnNvSfRJQvc8usWd8AoOxjw6\nKtfbQIe0r0C8QnNK9asUqG30zRoT+FVuwauu3rQKCe+CtRqCQW35UNa1A6b1\napPx\r\n=N9vL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8olVgi3eKQlLddO+aZFjgy4A+F4nWMSkrD0JDU2zHkAiB/QdyjISp3lJBFr8ypOH82fhd93Pe7qzt3I7Ff3YD2kw=="}],"size":2391,"noattachment":false,"key":"/is-interactive/-/is-interactive-2.0.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/is-interactive_2.0.0_1620073149866_0.8395475468833107"},"_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":1620073149981,"_cnpm_publish_time":1620073149981,"dist-tags":{"latest":"2.0.0"}}