We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e622437 commit 63450a0Copy full SHA for 63450a0
underscored.js
@@ -1,5 +1,5 @@
1
var trim = require('./trim');
2
3
module.exports = function underscored(str) {
4
- return trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase();
+ return trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/([A-Z\d]+)([A-Z][a-z])/,'$1_$2').replace(/[-\s]+/g, '_').toLowerCase();
5
};
0 commit comments