MCPcopy Create free account
hub / github.com/Yaffle/EventSource / inArray

Function inArray

tests/qunit.js:1173–1185  ·  view source on GitHub ↗
( elem, array )

Source from the content-addressed store, hash-verified

1171
1172// from jquery.js
1173function inArray( elem, array ) {
1174 if ( array.indexOf ) {
1175 return array.indexOf( elem );
1176 }
1177
1178 for ( var i = 0, length = array.length; i < length; i++ ) {
1179 if ( array[ i ] === elem ) {
1180 return i;
1181 }
1182 }
1183
1184 return -1;
1185}
1186
1187function Test( settings ) {
1188 extend( this, settings );

Callers 2

validTestFunction · 0.85
qunit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected