refactor: combine slug utils into one module
This commit is contained in:
committed by
mrugesh
parent
32ee2f032c
commit
9c2f1ffd82
@ -1,14 +1,6 @@
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
|
||||
|
||||
exports.dasherize = function dasherize(name) {
|
||||
return ('' + name)
|
||||
.toLowerCase()
|
||||
.replace(/\s/g, '-')
|
||||
.replace(/[^a-z0-9\-\.]/gi, '')
|
||||
.replace(/\:/g, '');
|
||||
};
|
||||
|
||||
const supportedLangs = [
|
||||
'arabic',
|
||||
'chinese',
|
||||
|
Reference in New Issue
Block a user