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

Function createPositionalPseudo

2.0.3/Sizzle.js:421–437  ·  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

419 */
420
421 function createPositionalPseudo(fn) {
422 return markFunction(function(argument) {
423 argument = +argument;
424 return markFunction(function(seed, matches) {
425 var j,
426 matchIndexes = fn([], seed.length, argument),
427 i = matchIndexes.length;
428
429 // Match elements found at the specified indexes
430 while (i--) {
431 if (seed[(j = matchIndexes[i])]) {
432 seed[j] = !(matches[j] = seed[j]);
433 }
434 }
435 });
436 });
437 }
438
439 /**
440 * Detect xml

Callers 1

Sizzle.jsFile · 0.70

Calls 2

markFunctionFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected