MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / getData

Function getData

docs/_static/jquery-3.6.0.js:4405–4428  ·  view source on GitHub ↗
( data )

Source from the content-addressed store, hash-verified

4403 rmultiDash = /[A-Z]/g;
4404
4405function getData( data ) {
4406 if ( data === "true" ) {
4407 return true;
4408 }
4409
4410 if ( data === "false" ) {
4411 return false;
4412 }
4413
4414 if ( data === "null" ) {
4415 return null;
4416 }
4417
4418 // Only convert to a number if it doesn't change the string
4419 if ( data === +data + "" ) {
4420 return +data;
4421 }
4422
4423 if ( rbrace.test( data ) ) {
4424 return JSON.parse( data );
4425 }
4426
4427 return data;
4428}
4429
4430function dataAttr( elem, key, data ) {
4431 var name;

Callers 1

dataAttrFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected