angular-cn/docs/angular.io-package/rendering/toId.js

8 lines
157 B
JavaScript
Raw Normal View History

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