We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50ae64e commit 2e09516Copy full SHA for 2e09516
lib/any.js
@@ -2,8 +2,20 @@
2
3
module.exports = match
4
5
+match.needsIndex = [
6
+ 'first-child',
7
+ 'first-of-type',
8
+ 'last-child',
9
+ 'last-of-type',
10
+ 'nth-child',
11
+ 'nth-last-child',
12
+ 'nth-of-type',
13
+ 'nth-last-of-type',
14
+ 'only-child',
15
+ 'only-of-type'
16
+]
17
+
18
var zwitch = require('zwitch')
-var needs = require('./needs')
19
var test = require('./test')
20
var nest = require('./nest')
21
@@ -76,7 +88,7 @@ function configure(query, state) {
76
88
var index = -1
77
89
78
90
while (++index < pseudos.length) {
79
- if (needs.needsIndex.indexOf(pseudos[index].name) > -1) {
91
+ if (match.needsIndex.indexOf(pseudos[index].name) > -1) {
80
92
state.index = true
81
93
break
82
94
}
lib/needs.js
0 commit comments