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

Function winnow

docs/_static/jquery-3.6.0.js:3039–3062  ·  view source on GitHub ↗
( elements, qualifier, not )

Source from the content-addressed store, hash-verified

3037
3038// Implement the identical functionality for filter and not
3039function winnow( elements, qualifier, not ) {
3040 if ( isFunction( qualifier ) ) {
3041 return jQuery.grep( elements, function( elem, i ) {
3042 return !!qualifier.call( elem, i, elem ) !== not;
3043 } );
3044 }
3045
3046 // Single element
3047 if ( qualifier.nodeType ) {
3048 return jQuery.grep( elements, function( elem ) {
3049 return ( elem === qualifier ) !== not;
3050 } );
3051 }
3052
3053 // Arraylike of elements (jQuery, arguments, Array)
3054 if ( typeof qualifier !== "string" ) {
3055 return jQuery.grep( elements, function( elem ) {
3056 return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
3057 } );
3058 }
3059
3060 // Filtered directly for both simple and complex selectors
3061 return jQuery.filter( qualifier, elements, not );
3062}
3063
3064jQuery.filter = function( expr, elems, not ) {
3065 var elem = elems[ 0 ];

Callers 1

jquery-3.6.0.jsFile · 0.85

Calls 1

isFunctionFunction · 0.85

Tested by

no test coverage detected