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

Another simple parser for advanced search query syntax.

Results 12 search-string issues
Sort by recently updated
recently updated
newest added

https://github.com/mixmaxhq/search-string/blob/c2697f1551df4f32f75990a7f930656d03448522/src/searchString.js#L214 Solution: `removeKeyword(keywordToRemove, negatedToRemove) { this.textSegments = this.textSegments.filter( ({ value, negated }) => keywordToRemove !== value || negatedToRemove !== negated ); this.isStringDirty = true; }`

Currently, the library allows for things like `cheese` and `-cheese` to be inputted, and doesn't reason about the semantic meaning of having a property and its negation both present. There's...

It would be nice to have a @ types/search-string to include in Typescript projects.

enhancement
help wanted

In Gmail/Google, a "quoted text" means that it **must** be included in the search. `getTextSegments()` currently gets rid of any extra quotes "". While it's nice that it does that,...

Was looking for something exactly like this, and came across a few others: https://github.com/nepsilon/search-query-parser Both look equally good at first glance, which makes it difficult to choose... it'd be awesome...

When trying the mentioned functions with quotes, I am confused where I thought the mixed quotes would be preserved after parsing the stringified query. Is the following behavior intended? or...

https://github.com/mixmaxhq/search-string/blob/8eed1468019b58442222b144926c6e98652dff19/src/searchString.js#L303 I know it's a tiny thing, but I think it makes more sense to have conditions follow rather than precede the freetext. I'm happy to submit a PR but...

help wanted

`Foo:bar` === `foo:bar` in most cases I can think of. Maybe an option {toLowerCase: true} that defaults to true?

enhancement
help wanted
good first issue

Great job on this library! One thing: it seems important to support a whitelist of conditions. What if I wanted to search for text that had colons in it? Let's...

This will allow for a more convenient way to add multiple multi-word terms. For example: `color:green John Doe, Foo Bar` when setting `,` as field separator.

enhancement