From: Jason Bedard Date: Fri, 3 May 2013 02:01:15 +0000 (-0700) Subject: Use String.slice instead of String.substring in order to save a three bytes. Close... X-Git-Tag: 2.0.1~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5e42df0517cefa6e81bdc5c3206740a5958b545c;p=jquery.git Use String.slice instead of String.substring in order to save a three bytes. Close gh-1261. --- diff --git a/src/data.js b/src/data.js index a9b451788..95d06a000 100644 --- a/src/data.js +++ b/src/data.js @@ -238,7 +238,7 @@ jQuery.fn.extend({ name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); + name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } }