lib/utils.js
function generateSlug (title) {
    if (typeof title !== 'string') {
        throw new MeowError ('title is not a string');
    }
    title = title || '';
    title = title.toLocaleLowerCase().replace(/[\W]/g, '-').replace(/[\-]{2,}/g, '-');
    return title;
}
function generateSlug (title) {
    if (typeof title !== 'string') {
        throw new MeowError ('title is not a string');
    }
    title = title || '';
    title = title.toLocaleLowerCase().replace(/[\W]/g, '-').replace(/[\-]{2,}/g, '-');
    return title;
}
function generateSlug ( title ) { if ( typeof title !== 'string' ) { throw new MeowError ( 'title is not a string' ) ; } title = title || '' ; title = title . toLocaleLowerCase ( ) . replace ( / [\W] / g , '-' ) . replace ( / [\-]{2,} / g , '-' ) ; return title ; }
Generates slug for a given title
@param title
@returns {string} slug generated for @param title
Generates slug for a given title