search-string icon indicating copy to clipboard operation
search-string copied to clipboard

[Request] toLowerCase condition keywords

Open braco opened this issue 7 years ago • 2 comments

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

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

braco avatar May 24 '18 18:05 braco

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

bradvogel avatar May 24 '18 18:05 bradvogel

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?

mericsson avatar May 30 '18 20:05 mericsson