From: Timmy Willison Date: Thu, 31 Jan 2013 01:40:39 +0000 (-0500) Subject: Minor updates. All parameters of an internal function are for internal use only. X-Git-Tag: 1.9.1~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a707740360964caf27f85395544f7131193bcc8;p=jquery.git Minor updates. All parameters of an internal function are for internal use only. --- diff --git a/src/data.js b/src/data.js index 02cf90ba5..95aa0dc30 100644 --- a/src/data.js +++ b/src/data.js @@ -1,7 +1,7 @@ var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + +function internalData( elem, name, data, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } @@ -95,7 +95,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){ return ret; } -function internalRemoveData( elem, name, pvt /* For internal use only */ ){ +function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } @@ -205,11 +205,11 @@ jQuery.extend({ }, data: function( elem, name, data ) { - return internalData( elem, name, data, false ); + return internalData( elem, name, data ); }, removeData: function( elem, name ) { - return internalRemoveData( elem, name, false ); + return internalRemoveData( elem, name ); }, // For internal use only. @@ -304,12 +304,12 @@ function dataAttr( elem, key, data ) { if ( typeof data === "string" ) { try { data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; } catch( e ) {} // Make sure we set the data so it isn't changed later