JSFiddle - React, Tailwind, and code Playground
CoffeeScript
page = 'index/3'
if page.indexOf 'index' is -1 # does not contain index
console.log 'no index here'
page = 'index/3'
if page.indexOf 'index' is -1 # does not contain index
console.log 'no index here'