jasmine/spec/bundle.js
/**
	   * removes special characters, white spaces and duplicates
	   * @function
	   * @param {string} text document title and text
	   * @return {Array} tokens
	   */
removes special characters, white spaces and duplicates
@function
@param {string} text document title and text
@return {Array} tokens
removes special characters white spaces and duplicates @function @param { string } text document title and text @return { Array } tokens
tokenize(text) {
	    const uniqueWords = [];
	    const token = text.toLowerCase().replace(/[^\w\s]/gi, '').match(/\w+/g);
	    token.forEach((item) => {
	      if (!uniqueWords.includes(item)) {
	        uniqueWords.push(item);
	      }
	    });
	    return uniqueWords;
	  }
tokenize ( text ) { const uniqueWords = [ ] ; const token = text . toLowerCase ( ) . replace ( / [^\w\s] / gi , '' ) . match ( / \w+ / g ) ; token . forEach ( ( item ) => { if ( ! uniqueWords . includes ( item ) ) { uniqueWords . push ( item ) ; } } ) ; return uniqueWords ; }
removes special characters, white spaces and duplicates
 @function
 @param {string} text document title and text
 @return {Array} tokens
removes special characters white spaces and duplicates @function @param { string } text document title and text @return { Array } tokens