MCPcopy Create free account
hub / github.com/TruthHun/BookStack / winnow

Function winnow

static/wangEditor/js/lib/jquery-2.2.1.js:2726–2753  ·  view source on GitHub ↗
( elements, qualifier, not )

Source from the content-addressed store, hash-verified

2724
2725// Implement the identical functionality for filter and not
2726function winnow( elements, qualifier, not ) {
2727 if ( jQuery.isFunction( qualifier ) ) {
2728 return jQuery.grep( elements, function( elem, i ) {
2729 /* jshint -W018 */
2730 return !!qualifier.call( elem, i, elem ) !== not;
2731 } );
2732
2733 }
2734
2735 if ( qualifier.nodeType ) {
2736 return jQuery.grep( elements, function( elem ) {
2737 return ( elem === qualifier ) !== not;
2738 } );
2739
2740 }
2741
2742 if ( typeof qualifier === "string" ) {
2743 if ( risSimple.test( qualifier ) ) {
2744 return jQuery.filter( qualifier, elements, not );
2745 }
2746
2747 qualifier = jQuery.filter( qualifier, elements );
2748 }
2749
2750 return jQuery.grep( elements, function( elem ) {
2751 return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
2752 } );
2753}
2754
2755jQuery.filter = function( expr, elems, not ) {
2756 var elem = elems[ 0 ];

Callers 1

jquery-2.2.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected