Data: Separate data & css/effects camelCase implementations
[jquery.git] / src / core / camelCase.js
blob95de46866b7b76f9a0f0be3a3711576673511e8d
1 define( [], function() {
3 "use strict";
5 // Matches dashed string for camelizing
6 var rdashAlpha = /-([a-z])/g;
8 // Used by camelCase as callback to replace()
9 function fcamelCase( all, letter ) {
10 return letter.toUpperCase();
13 // Convert dashed to camelCase
14 function camelCase( string ) {
15 return string.replace( rdashAlpha, fcamelCase );
18 return camelCase;
20 } );