Package details at: robust-search or https://www.npmjs.com/package/robust-search
It's a robust and flexible search component.
It allows for an almost match, i.e., "Jenna" wouldn't equal "jena", but now it can. So it's objective it's to give more tools to compare, taking into account user's human mistakes
For the complete documentation, click here
<script src="https://cdn.jsdelivr.net/npm/robust-search/index.js"></script>npm i --save-dev robust-searchWithout this, it won't work
import {
equal,
different,
almost,
unalike,
isMatch,
search,
exclude,
contains
} from "robust-search"Is a string the same as another?
// String equal
"test".equal("test") // returns true
// String equal
"test".equal("tset") // returns falseIs a string not the same as another?
// String not equal
"test".diff("tset") // returns trueIs a string almost same as another?
// String almost
"test".almost("tset") // returns trueIs a string not quite the same as another?
// String unalike
"test".unalike("tset") // returns falseThis will use all of the above to check for a match
// String isMatch (does an almost or equal)
"test".isMatch("tset") // returns trueDoes it contain the substring given? Sort of an includes
// String contains
"test".contains("est") // returns true
// String doesn't contain
"test".contains("tset") // returns falseSearchs using the above methods inside an array
// String search
search([ "test", "hello", "world!" ], "test") // returns ["test"]Searchs for non-matches using the above methods inside an array
// String exclude
exclude([ "test", "hello", "world!" ], "test") // returns ["hello", "world!"]