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

Case insensitive keywords #22

Open
subeax opened this issue Jul 21, 2018 · 1 comment
Open

Case insensitive keywords #22

subeax opened this issue Jul 21, 2018 · 1 comment

Comments

@subeax
Copy link

subeax commented Jul 21, 2018

Hi!
Thank you for this amazing library!

I think it may be helpful to ignore keywords case.

const options = {
    keywords: ['name', 'town'],
};

const query = "Name:John,Ben,Bill";

might be done by adding new option, like

ignoreCase: true // or something else

and adding condition to line 130:

// We got an advanced search syntax
else {
 key = options.ignoreCase 
          ? term.keyword.toLowerCase() 
          :  term.keyword
...

Thoughts? :)

@nepsilon
Copy link
Owner

Yes, very good idea! Can you send a pull request with this addition and a few tests?

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