diff options
Diffstat (limited to 'node_modules/jquery/src/core/camelCase.js')
| -rw-r--r-- | node_modules/jquery/src/core/camelCase.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/node_modules/jquery/src/core/camelCase.js b/node_modules/jquery/src/core/camelCase.js new file mode 100644 index 0000000..b271044 --- /dev/null +++ b/node_modules/jquery/src/core/camelCase.js @@ -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; + +} ); |
