Skip to content

Commit 2e09516

Browse files
committed
move needsIndex to any
1 parent 50ae64e commit 2e09516

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

lib/any.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
module.exports = match
44

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+
518
var zwitch = require('zwitch')
6-
var needs = require('./needs')
719
var test = require('./test')
820
var nest = require('./nest')
921

@@ -76,7 +88,7 @@ function configure(query, state) {
7688
var index = -1
7789

7890
while (++index < pseudos.length) {
79-
if (needs.needsIndex.indexOf(pseudos[index].name) > -1) {
91+
if (match.needsIndex.indexOf(pseudos[index].name) > -1) {
8092
state.index = true
8193
break
8294
}

lib/needs.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)