Simple NodeJS function to highlight terms in a text