angular-cn/public/api-builder/angular.io-package/rendering/toId.js

8 lines
163 B
JavaScript
Raw Normal View History

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