MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / condense

Function condense

public/localscripts/calculationQuestion/jquery.js:2461–2480  ·  view source on GitHub ↗
( unmatched, map, filter, context, xml )

Source from the content-addressed store, hash-verified

2459}
2460
2461function condense( unmatched, map, filter, context, xml ) {
2462 var elem,
2463 newUnmatched = [],
2464 i = 0,
2465 len = unmatched.length,
2466 mapped = map != null;
2467
2468 for ( ; i < len; i++ ) {
2469 if ( (elem = unmatched[i]) ) {
2470 if ( !filter || filter( elem, context, xml ) ) {
2471 newUnmatched.push( elem );
2472 if ( mapped ) {
2473 map.push( i );
2474 }
2475 }
2476 }
2477 }
2478
2479 return newUnmatched;
2480}
2481
2482function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2483 if ( postFilter && !postFilter[ expando ] ) {

Callers 2

setMatcherFunction · 0.85
superMatcherFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected