MCPcopy Index your code
hub / github.com/apache/caldera / winnow

Function winnow

static/jquery/jquery.js:2765–2792  ·  view source on GitHub ↗
( elements, qualifier, not )

Source from the content-addressed store, hash-verified

2763
2764// Implement the identical functionality for filter and not
2765function winnow( elements, qualifier, not ) {
2766 if ( jQuery.isFunction( qualifier ) ) {
2767 return jQuery.grep( elements, function( elem, i ) {
2768 /* jshint -W018 */
2769 return !!qualifier.call( elem, i, elem ) !== not;
2770 } );
2771
2772 }
2773
2774 if ( qualifier.nodeType ) {
2775 return jQuery.grep( elements, function( elem ) {
2776 return ( elem === qualifier ) !== not;
2777 } );
2778
2779 }
2780
2781 if ( typeof qualifier === "string" ) {
2782 if ( risSimple.test( qualifier ) ) {
2783 return jQuery.filter( qualifier, elements, not );
2784 }
2785
2786 qualifier = jQuery.filter( qualifier, elements );
2787 }
2788
2789 return jQuery.grep( elements, function( elem ) {
2790 return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;
2791 } );
2792}
2793
2794jQuery.filter = function( expr, elems, not ) {
2795 var elem = elems[ 0 ];

Callers 1

jquery.jsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected