MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / createPositionalPseudo

Function createPositionalPseudo

camera/jquery.js:965–981  ·  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

963 * @param {Function} fn
964 */
965function createPositionalPseudo( fn ) {
966 return markFunction(function( argument ) {
967 argument = +argument;
968 return markFunction(function( seed, matches ) {
969 var j,
970 matchIndexes = fn( [], seed.length, argument ),
971 i = matchIndexes.length;
972
973 // Match elements found at the specified indexes
974 while ( i-- ) {
975 if ( seed[ (j = matchIndexes[i]) ] ) {
976 seed[j] = !(matches[j] = seed[j]);
977 }
978 }
979 });
980 });
981}
982
983/**
984 * Checks a node for validity as a Sizzle context

Callers 1

jquery.jsFile · 0.85

Calls 1

markFunctionFunction · 0.85

Tested by

no test coverage detected