freeCodeCamp/curriculum/utils.js

19 lines
326 B
JavaScript

exports.dasherize = function dasherize(name) {
return ('' + name)
.toLowerCase()
.replace(/\s/g, '-')
.replace(/[^a-z0-9\-\.]/gi, '')
.replace(/\:/g, '');
};
const supportedLangs = [
'arabic',
'chinese',
'english',
'portuguese',
'russian',
'spanish'
];
exports.supportedLangs = supportedLangs;