8 lines
157 B
JavaScript
8 lines
157 B
JavaScript
|
module.exports = function() {
|
||
|
return {
|
||
|
name: 'toId',
|
||
|
process: function(str) {
|
||
|
return str.replace(/[^(a-z)(A-Z)(0-9)._-]/, '-');
|
||
|
}
|
||
|
};
|
||
|
};
|