Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.to.lowerCase or startsWithCaseInsensitive #10

Open
rbosneag opened this issue Mar 14, 2016 · 2 comments
Open

.to.lowerCase or startsWithCaseInsensitive #10

rbosneag opened this issue Mar 14, 2016 · 2 comments

Comments

@rbosneag
Copy link

More of a feature request than an issue here:

I am trying to assert strings equality and comparisons for strings with unknown case so I'd find useful a conversion operator (toLower/toUpper) or maybe assert functions with caseInsensitive param (not so great option). I can easily fix my issue now but your plugin is a good idea and might benefit from such additions.

Thanks for the nice addition to chai.

@onechiporenko
Copy link
Owner

Hi, @rbosneag.
May be equalignorecase may be useful for you?

@rbosneag
Copy link
Author

Not in my case as I needed to compare only parts of the strings (variable length, may be at the start of the string, in the middle, anywhere).

I think a more general converter would be useful to place somewhere in the chain, i.e. toLowerCase and after that you can apply all of your tests but on the lowercase version of your string.

What do you think?

@ghost ghost mentioned this issue Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants