https://medium.com/thecodingway/exploring-the-javascript-function-issubsequence-for-efficient-string-matching-02f162ad415b