Skip to content

Commit 0940cb9

Browse files
committed
All: Remove uses of jQuery.camelCase()
Ref #15160 Ref jquerygh-1813
1 parent ae31f2b commit 0940cb9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/lib/qunit-assert-domequal.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ domEqual.attributes = [
5959
"title"
6060
];
6161

62+
function camelCase( string ) {
63+
return string.replace( /-([\da-z])/gi, function( all, letter ) {
64+
return letter.toUpperCase();
65+
} );
66+
}
67+
6268
function getElementStyles( elem ) {
6369
var styles = {};
6470
var style = elem.ownerDocument.defaultView ?
@@ -71,7 +77,7 @@ function getElementStyles( elem ) {
7177
while ( len-- ) {
7278
key = style[ len ];
7379
if ( typeof style[ key ] === "string" ) {
74-
styles[ $.camelCase( key ) ] = style[ key ];
80+
styles[ camelCase( key ) ] = style[ key ];
7581
}
7682
}
7783

ui/effect.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,12 @@ $.each(
746746
}
747747
);
748748

749+
function camelCase( string ) {
750+
return string.replace( /-([\da-z])/gi, function( all, letter ) {
751+
return letter.toUpperCase();
752+
} );
753+
}
754+
749755
function getElementStyles( elem ) {
750756
var key, len,
751757
style = elem.ownerDocument.defaultView ?
@@ -758,7 +764,7 @@ function getElementStyles( elem ) {
758764
while ( len-- ) {
759765
key = style[ len ];
760766
if ( typeof style[ key ] === "string" ) {
761-
styles[ $.camelCase( key ) ] = style[ key ];
767+
styles[ camelCase( key ) ] = style[ key ];
762768
}
763769
}
764770

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy