MCPcopy Index your code
hub / github.com/jquery/jquery / createPositionalPseudo

Function createPositionalPseudo

dist-module/jquery.module.js:1376–1392  ·  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

1374 * @param {Function} fn
1375 */
1376function createPositionalPseudo( fn ) {
1377 return markFunction( function( argument ) {
1378 argument = +argument;
1379 return markFunction( function( seed, matches ) {
1380 var j,
1381 matchIndexes = fn( [], seed.length, argument ),
1382 i = matchIndexes.length;
1383
1384 // Match elements found at the specified indexes
1385 while ( i-- ) {
1386 if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
1387 seed[ j ] = !( matches[ j ] = seed[ j ] );
1388 }
1389 }
1390 } );
1391 } );
1392}
1393
1394/**
1395 * Sets document-related variables once based on the current document

Callers 1

jQueryFactoryFunction · 0.70

Calls 2

markFunctionFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected