Added an option to change date format

This commit is contained in:
Cassie Esposito 2022-06-17 01:26:10 -07:00
parent c2e90d4d83
commit 9ba0e52bb7
5 changed files with 37 additions and 6 deletions

View file

@ -169,7 +169,7 @@ Vue.prototype.$sanitizeSlug = (str) => {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i))
}
str = str.replace('.', '-') // replace a dot by a dash
str = str.replace('.', '-') // replace a dot by a dash
.replace(/[^a-z0-9 -_]/g, '') // remove invalid chars
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
.replace(/-+/g, '-') // collapse dashes