Comparing version 1.2.2 to 1.3.0
24
index.js
@@ -0,9 +1,19 @@ | ||
const env = process.env; | ||
const isDisabled = "NO_COLOR" in env | ||
const isForced = "FORCE_COLOR" in env | ||
const isWindows = process.platform === "win32" | ||
const isCompatibleTerminal = | ||
process.stdout != null && | ||
process.stdout.isTTY && | ||
env.TERM && | ||
env.TERM !== "dumb" | ||
const isCI = | ||
"CI" in env && | ||
("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env) | ||
let enabled = | ||
!("NO_COLOR" in process.env) && | ||
("FORCE_COLOR" in process.env || | ||
process.platform === "win32" || | ||
(process.stdout != null && | ||
process.stdout.isTTY && | ||
process.env.TERM && | ||
process.env.TERM !== "dumb")) | ||
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI) | ||
@@ -10,0 +20,0 @@ const raw = (open, close, searchRegex, replaceValue) => (s) => |
{ | ||
"name": "colorette", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"type": "module", | ||
@@ -8,3 +8,3 @@ "main": "index.cjs", | ||
"types": "index.d.ts", | ||
"description": "Easily set the color and style of text in the terminal.", | ||
"description": "Easily set the text color and style in the terminal.", | ||
"repository": "jorgebucaran/colorette", | ||
@@ -11,0 +11,0 @@ "license": "MIT", |
# Colorette | ||
> Easily set the color and style of text in the terminal. | ||
> Easily set the text color and style in the terminal. | ||
@@ -55,2 +55,4 @@ - No wonky prototype method-chain API. | ||
See [supported styles](#supported-styles). | ||
```js | ||
@@ -62,4 +64,2 @@ import { blue } from "colorette" | ||
See [supported styles](). | ||
### `options.enabled` | ||
@@ -66,0 +66,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11261
197