8 lines
163 B
JavaScript
Raw Normal View History

2015-09-18 13:25:18 -07:00
module.exports = function toId() {
return {
name: 'toId',
process: function(str) {
return str.replace(/[^(a-z)(A-Z)(0-9)._-]/g, '-');
}
};
};