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

[Request] toLowerCase condition keywords #21

Open
braco opened this issue May 24, 2018 · 2 comments
Open

[Request] toLowerCase condition keywords #21

braco opened this issue May 24, 2018 · 2 comments

Comments

@braco
Copy link

braco commented May 24, 2018

Foo:bar === foo:bar in most cases I can think of.

Maybe an option {toLowerCase: true} that defaults to true?

@bradvogel
Copy link
Contributor

Yeah, or ignoreCase: true that defaults to true (would require a major version bump)

@mericsson
Copy link
Contributor

mericsson commented May 30, 2018

Makes sense, good suggestion. I think change:

static parse(str, transformTextToConditions = []

https://github.com/mixmaxhq/search-string/blob/8eed146/src/searchString.js#L30

To:

static parse(str, options = {
  // Default options.
  transformTextToConditions: [],
  ignoreOperatorCase: true  // Ignores case of operator only.
});

... and do the rest of the implementation 🥇

And it would be a major version bump.

What do you think @braco? Want to take a stab at it with a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants