Startswith
DomSavd opened this issue · 3 comments
DomSavd commented
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 commented
+1 I hope there is an adjustable parameter to define the fuzziness.
wych42 commented
+1
mattyork commented
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"]