blob: 799fb3752f74e13ccab5522e57ca7e2a04f41298 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001define( [], function() {
2
3"use strict";
4
5// Matches dashed string for camelizing
6var rmsPrefix = /^-ms-/,
7 rdashAlpha = /-([a-z])/g;
8
9// Used by camelCase as callback to replace()
10function fcamelCase( all, letter ) {
11 return letter.toUpperCase();
12}
13
14// Convert dashed to camelCase; used by the css and data modules
15// Support: IE <=9 - 11, Edge 12 - 15
16// Microsoft forgot to hump their vendor prefix (#9572)
17function camelCase( string ) {
18 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
19}
20
21return camelCase;
22
23} );