(defn text->tag [text]
(first
(for [[keyword tag] keyword->tag
:when (clojure.string/includes? text keyword)]
tag)))
“Joe’s Coffee Hit” text->tag
:error #object[TypeError TypeError: a.indexOf is not a function. (In 'a.indexOf(b)', 'a.indexOf' is undefined)]
If you type "Joe's Coffee Hut" (including the "!) into the textbox above and hit the text->tag button, you'll see the result of running the text->tag function on that input.
Looks great xD