I'm witing a function that returns a HTML class according to the last part of the url:
const currentPage = this.$route.path
const pinkPages = [ '/', '/forgot-pass', '/reset-pass' ]
if (pinkPages.indexOf(currentPage) > -1) return 'footer-pink'
It work fine, the problem is that /reset-pass actually has more characters at the end. For example, /reset-pass/123.
How can I make it so that the function returns footer-pink when the URL is /reset-pass/1234 or /reset-pass/abcd or other pattern like that?
new RegExp().currentPagevalue?