MCPcopy Create free account
hub / github.com/JsAaron/jQuery / createPositionalPseudo

Function createPositionalPseudo

2.0.3/Sizzle-annotation.js:466–482  ·  view source on GitHub ↗

* Returns a function to use in pseudos for positionals * @param {Function} fn

(fn)

Source from the content-addressed store, hash-verified

464 */
465
466 function createPositionalPseudo(fn) {
467 return markFunction(function(argument) {
468 argument = +argument;
469 return markFunction(function(seed, matches) {
470 var j,
471 matchIndexes = fn([], seed.length, argument),
472 i = matchIndexes.length;
473
474 // Match elements found at the specified indexes
475 while (i--) {
476 if (seed[(j = matchIndexes[i])]) {
477 seed[j] = !(matches[j] = seed[j]);
478 }
479 }
480 });
481 });
482 }
483
484 /**
485 * Detect xml

Callers 1

Calls 2

markFunctionFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected