We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02d2141 commit d1ff3a7Copy full SHA for d1ff3a7
index.js
@@ -17,13 +17,13 @@ export const isColorSupported =
17
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI)
18
19
const raw = (open, close, searchRegex, replaceValue) => (s) =>
20
- !s && (s === "" || s === undefined)
21
- ? ""
22
- : open +
+ s || !(s === "" || s === undefined)
+ ? open +
23
(~(s + "").indexOf(close, 4) // skip opening \x1b[
24
? s.replace(searchRegex, replaceValue)
25
: s) +
26
close
+ : ""
27
28
const init = (open, close) =>
29
raw(
0 commit comments