[FEATURE] Support browser environment #31
Replies: 3 comments 6 replies
-
I wouldn't be opposed to helping implement the feature, I'm just not personally a fan of opinionated contribution guidelines. |
Beta Was this translation helpful? Give feedback.
-
Hello @KrystilizeNevaDies, thanks for the feature request! I know that Chrome supports ANSI codes in the browser console. Ansis is focused on small size. This is its key feature. Currently, Ansis and Picocolors are competing for using in popular significant projects. The size of the Ansis package (6.76 kB) is almost the same as that of Picocolors (6.37 kB). Adding browser support will increase the package size, which will significantly reduce the competitiveness of Ansis compared to Picocolors. Sorry, but I won't be adding new features at the moment. Maybe later... P.S. If you need the supporting ANSI codes in the browser console, you can use Chalk. |
Beta Was this translation helpful? Give feedback.
-
In next version I will add browser detection to allow ANSI codes for chromium browsers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request
Support ansis in the browser.
What is motivation or use case for adding/changing the behavior?
I'd like the be able to use ansis as a cross platform solution for terminal coloring.
Describe the solution you'd like
Do a best-effort detection of color support in the browser's console, and enable ansi codes if supported.
This feature request does not include inline html rendering. This would require a separate feature request given this feature is implemented.
Describe alternatives you've considered
The only current viable alternative is to use another library such as chalk.
Appreciation for the useful project
Beta Was this translation helpful? Give feedback.
All reactions