const slugify = (str) =>str.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]+/g, '');
const slugify = (str: string): string =>str.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]+/g, '');
slugify('Chapter One: Once upon a time...'); // 'chapter-one-once-upon-a-time'