tty: add hasColors function by BridgeAR · Pull Request #26247 · nodejs/node (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation12 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

BridgeAR

This adds a small wrapper around the getColorDepth function to check
if the stream supports at least a specific amount of colors. This is
convenient as the other API is not as straight forward and most use
cases likely only want to know if a specific amount of colors is
supported or not.

Checklist

@nodejs-github-bot

@addaleax addaleax added the semver-minor

PRs that contain new features and should be released in the next minor version.

label

Feb 21, 2019

addaleax

@BridgeAR

@BridgeAR BridgeAR added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Feb 21, 2019

starkwang

@BridgeAR

vsemozhetbyt

jasnell

thefourtheye

jasnell

* `count` {integer} The number of colors that are requested (minimum 2).
**Default:** 16.
* `env` {Object} An object containing the environment variables to check.
**Default:** `process.env`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit... it's not clear from the documentation how the env bit works here. Perhaps an example?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two examples below but I'll try to improve the wording further.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

@BridgeAR

@BridgeAR

jasnell

@BridgeAR

This adds a small wrapper around the getColorDepth function to check if the stream supports at least a specific amount of colors. This is convenient as the other API is not as straight forward and most use cases likely only want to know if a specific amount of colors is supported or not.

@BridgeAR

BridgeAR added a commit to BridgeAR/node that referenced this pull request

Mar 5, 2019

@BridgeAR

This adds a small wrapper around the getColorDepth function to check if the stream supports at least a specific amount of colors. This is convenient as the other API is not as straight forward and most use cases likely only want to know if a specific amount of colors is supported or not.

PR-URL: nodejs#26247 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Weijia Wang starkwang@126.com Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Sakthipriyan Vairamani thechargingvolcano@gmail.com

@BridgeAR

targos pushed a commit to targos/node that referenced this pull request

Mar 27, 2019

@BridgeAR @targos

This adds a small wrapper around the getColorDepth function to check if the stream supports at least a specific amount of colors. This is convenient as the other API is not as straight forward and most use cases likely only want to know if a specific amount of colors is supported or not.

PR-URL: nodejs#26247 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Weijia Wang starkwang@126.com Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Sakthipriyan Vairamani thechargingvolcano@gmail.com

targos added a commit that referenced this pull request

Mar 27, 2019

@targos

Notable changes:

PR-URL: #26949

targos added a commit that referenced this pull request

Mar 28, 2019

@targos

Notable changes:

PR-URL: #26949

targos added a commit that referenced this pull request

Mar 28, 2019

@targos

Notable changes:

PR-URL: #26949

BethGriggs pushed a commit that referenced this pull request

Apr 5, 2019

@targos @BethGriggs

Notable changes:

PR-URL: #26949

BethGriggs pushed a commit that referenced this pull request

Apr 16, 2019

@BridgeAR @BethGriggs

This adds a small wrapper around the getColorDepth function to check if the stream supports at least a specific amount of colors. This is convenient as the other API is not as straight forward and most use cases likely only want to know if a specific amount of colors is supported or not.

PR-URL: #26247 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Weijia Wang starkwang@126.com Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Sakthipriyan Vairamani thechargingvolcano@gmail.com

This was referenced

May 29, 2019

@Qix- Qix- mentioned this pull request

Jul 12, 2019

Labels

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

semver-minor

PRs that contain new features and should be released in the next minor version.

tty

Issues and PRs related to the tty subsystem.