question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not support `keyword`

See original GitHub issue

When I switched from chalk to ansi-colors, I couldn’t use ansi.keyword('hotpink') like I was using in chalk.

Not a big deal (a little sad as I liked hotpink, but red is fine), but I would suggest removing the ‘drop-in’ qualifier, either removing it completely or replacing it with something like ‘simpler’. Maybe removing the bullet-point in the readme.

That or adding .keyword support. Cheers!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
jonschlinkertcommented, Nov 20, 2018

I’m not sure where the 99% statistic comes from

Sorry, I didn’t mean to casually throw around numbers. Allow me to clarify.

Given that:

  1. Statistically, this library is depended on by ~175-200 libraries.
  2. On average across industries, it’s estimated that 1 in 20-25 people that have a problem will actually complain (or let someone know) that they’re unhappy. This, obviously, is a rule of thumb and we have no way to know if this is accurate, but it’s based on various studies over the years, and you can find information about these if you spend some time on google looking for them.
  3. I believe, based on experience, that because of the ease of creating an issue and the fact that the ecosystem encourages it, and that issues cause other people’s code to break, far more developers tend to speak up about them than the average industry. I’m guessing as many as 30-50%.

Since this is the first issue that someone has created about a feature that is in chalk but is missing from ansi-colors, I can say with confidence that only 1 in 175 implementors have definitely had the problem you experienced. It might be more, but I don’t have proof of that. It’s safe to assume that if no one else had the same problem, that they - like me - are not using the other “non-standard” ANSI colors, and would be unlikely to notice what you did in the readme.

With all of that in mind, I supposed should have said, “based on the actual facts on hand, we can assume that approximately ~99.5% of developers do not use the other features in chalk OR did not care enough about them to complain. Which means that ansi-colors is a drop-in replacement for 99.5% of people.” If we assume that half as many people report issues than my estimate above, then it would be ~99%.

  • clearly state what function calls are supported and what are not in the docs

It’s a certainty that someone like you will create an issue anytime we’re wrong on the readme, so this was not omitted intentionally. We looked at chalk a long time ago, and I don’t remember seeing any of the other stuff that has been added to the chalk API since. IMHO, there was no reason to look again, since it was a relatively simple library that did one thing (or so I thought). Thank you for pointing out the disparity. we will get the readme updated.

0reactions
rootworkcommented, May 19, 2021

FWIW between this and #40 I agree that having it described as a “drop-in replacement” is unnecessary and not really true. I was using named keywords and hex values and had to change them when I adopted this package. But ansi-colors is great, and as @jedahan says the project stands on its own without that comparison anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

keyword not supported data source - asp.net mvc
I had to install SQL Server Management Studio, Create new DB, import there all the data from the previous .MDF file. Only thing...
Read more >
[Solved] Keyword not supported: 'datasource'. - CodeProject
Hi All, I am using OracleConnection in C# application. i am getting error while using Connection Timeout in Connection String. Please help on ......
Read more >
Keyword not supported: 'backend' - Progress Community
When trying to connect Sitefinity to SQL Azure and using 'Backend=SQLAzure' an error with message "Keyword not supported: 'backend'" is ...
Read more >
The issue about "Keyword not supported: 'data source'" - MSDN
I have no idea why it show up the exception about the keyword "data source", I even didn't use it in my connection...
Read more >
Sidekiq does not support keyword arguments #2372 - GitHub
Problem. Sidekiq does not seem to support keyword arguments for its worker perform method. Ruby introduced in 2.0 the ability to do keyword...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found