Using a Set instead of a Array for stopWords
SuperAmin opened this issue · comments
Amin commented
I was wondering why stopWords is a Array of words instead of a Set (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) since it looks like you're only using it to check if a word in a document/query is contained in stopWords.
kabir shah commented
A set would be a better approach in this case, but they are not compatible with older versions of IE. Once most browsers support ES6 and Set
, they will definitely be used in Wade.