Mercurial > nebulaweb3
comparison default/node_modules/jquery/src/core/camelCase.js @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1d038bc9b3d2 |
---|---|
1 define( [], function() { | |
2 | |
3 "use strict"; | |
4 | |
5 // Matches dashed string for camelizing | |
6 var rmsPrefix = /^-ms-/, | |
7 rdashAlpha = /-([a-z])/g; | |
8 | |
9 // Used by camelCase as callback to replace() | |
10 function 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) | |
17 function camelCase( string ) { | |
18 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); | |
19 } | |
20 | |
21 return camelCase; | |
22 | |
23 } ); |