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

Startswith #14

Open
DomSavd opened this issue Feb 1, 2016 · 3 comments
Open

Startswith #14

DomSavd opened this issue Feb 1, 2016 · 3 comments

Comments

@DomSavd
Copy link

DomSavd commented Feb 1, 2016

Hi,

Is it possible to match an exact text? For example, i want to retrieve the results for all value that as "thisvalue" but not the other resultats that contain these letter for example "this poor value".

Thanks!

@wuyuanyi135
Copy link

+1 I hope there is an adjustable parameter to define the fuzziness.

@wych42
Copy link

wych42 commented Jun 2, 2016

+1

@mattyork
Copy link
Owner

Can you folks provide some examples you'd like to see implemented so I have a better understanding of what knobs to provide?

To get exact startsWith behavior, there is no need for this library. You can define your own function:

var filter = (arr, searchTerm) => arr.filter(str => str.indexOf(searchTerm) === 0);
filter(["abc", "zabc"], "ab")
// ["abc"]

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

4 participants