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

8 lines
163 B
JavaScript

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