Skip to content

Commit

Permalink
Added domToHyphenated module which I forgot...
Browse files Browse the repository at this point in the history
  • Loading branch information
stucox committed Feb 26, 2013
1 parent fdbea7e commit 5f6cf2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/domToHyphenated.js
@@ -0,0 +1,9 @@
define(function() {
// Helper function for e.g. boxSizing -> box-sizing
function domToHyphenated (name) {
return name.replace(/([A-Z])/g, function(str, m1) {
return '-' + m1.toLowerCase();
}).replace(/^ms-/, '-ms-');
}
return domToHyphenated;
});

0 comments on commit 5f6cf2c

Please sign in to comment.