-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: make camelCase function available only for internal usage
- Loading branch information
Showing
9 changed files
with
66 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
define( [], function() { | ||
|
||
"use strict"; | ||
|
||
// Matches dashed string for camelizing | ||
var rmsPrefix = /^-ms-/, | ||
rdashAlpha = /-([a-z])/g; | ||
|
||
// Used by camelCase as callback to replace() | ||
function fcamelCase( all, letter ) { | ||
return letter.toUpperCase(); | ||
} | ||
|
||
// Convert dashed to camelCase; used by the css and data modules | ||
// Support: IE <=9 - 11, Edge 12 - 15 | ||
// Microsoft forgot to hump their vendor prefix (#9572) | ||
function camelCase( string ) { | ||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); | ||
} | ||
|
||
return camelCase; | ||
|
||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters