* Returns a function to use in pseudos for positionals * @param {Function} fn
( fn )
| 1279 | * @param {Function} fn |
| 1280 | */ |
| 1281 | function createPositionalPseudo( fn ) { |
| 1282 | return markFunction(function( argument ) { |
| 1283 | argument = +argument; |
| 1284 | return markFuntion(function( seed, matches ) { |
| 1285 | var j, |
| 1286 | matchIndexes = fn( [], seed.length, argument ), |
| 1287 | i = matchIndexes.length; |
| 1288 | |
| 1289 | // Match elements found at the specified indexes |
| 1290 | while ( i-- ) { |
| 1291 | if ( seed[ (j = matchIndexes[i]) ] ) { |
| 1292 | seed[j] = !(matches[j] = seed[j]); |
| 1293 | } |
| 1294 | } |
| 1295 | }); |
| 1296 | }); |
| 1297 | } |
| 1298 | |
| 1299 | /** |
| 1300 | * Detect xml |
no test coverage detected