jQuery
Plugins
UI
Blog
About
Donate
Download
Documentation
Tutorials
Bug Tracker
Discussion
Bug Tracker
Search
Tickets
Go
Tracker Account
Login
About Trac
Preferences
Help/Guide
Register
Bug Tracker
Wiki
Roadmap
Browse Source
View Tickets
Search
Timeline
Ticket #2619
: makeArray.diff
File makeArray.diff,
0.7 kB
(added by flesler,
10 months
ago)
src/core.js
1120
1120
makeArray: function( array ) {
1121
1121
var ret = [];
1122
1122
1123
// Need to use typeof to fight Safari childNodes crashes
1124
if ( array.constructor != Array )
1125
for ( var i = 0, length = array.length; i < length; i++ )
1126
ret.push( array[ i ] );
1127
else
1128
ret = array.slice( 0 );
1123
if( array != undefined )
1124
//strings and functions also have 'length'
1125
if( array.length != undefined && !array.split && !array.call )
1126
for( var i = array.length; i; )
1127
ret[--i] = array[i];
1128
else
1129
ret[0] = array;
1129
1130
1130
1131
return ret;
1131
1132
},
Download in other formats:
Original Format