Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
displayTitle() {
const displayTitle = this.title.replace(/.*Invitation: /, "")
const [displayTitleWithoutDate, date] = displayTitle.split(" @ ")
if (!chrono) {
chrono = require('chrono-node').default; //eslint-disable-line
}
if (date && chrono.parseDate(date)) {
return displayTitleWithoutDate
}
return displayTitle
}
function getChrono() {
if (!_chrono) {
_chrono = require('chrono-node').default; //eslint-disable-line
}
return _chrono;
}