Skip to content

Commit f38c805

Browse files
committed
Refactor comment-style
1 parent 2e5b7d6 commit f38c805

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/attribute.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ function match(query, node) {
3232
return true
3333
}
3434

35-
/* [attr] */
35+
// [attr]
3636
function exists(query, node) {
3737
return has(node, query.name)
3838
}
3939

40-
/* [attr=value] */
40+
// [attr=value]
4141
function exact(query, node) {
4242
return has(node, query.name) && String(node[query.name]) === query.value
4343
}
4444

45-
/* [attr~=value] */
45+
// [attr~=value]
4646
function containsArray(query, node) {
4747
var value
4848

@@ -65,7 +65,7 @@ function containsArray(query, node) {
6565
return false
6666
}
6767

68-
/* [attr^=value] */
68+
// [attr^=value]
6969
function begins(query, node) {
7070
var value = node[query.name]
7171

@@ -75,7 +75,7 @@ function begins(query, node) {
7575
)
7676
}
7777

78-
/* [attr$=value] */
78+
// [attr$=value]
7979
function ends(query, node) {
8080
var value = node[query.name]
8181

@@ -85,7 +85,7 @@ function ends(query, node) {
8585
)
8686
}
8787

88-
/* [attr*=value] */
88+
// [attr*=value]
8989
function containsString(query, node) {
9090
var value = node[query.name]
9191
return typeof value === 'string' && value.indexOf(query.value) !== -1

lib/nest.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ var handle = zwitch('nestingOperator')
1111
var handlers = handle.handlers
1212

1313
handle.unknown = unknownNesting
14-
handle.invalid = topScan /* `undefined` is the top query selector. */
15-
handlers.null = descendant /* `null` is the descendant combinator. */
14+
handle.invalid = topScan // `undefined` is the top query selector.
15+
handlers.null = descendant // `null` is the descendant combinator.
1616
handlers['>'] = child
1717
handlers['+'] = adjacentSibling
1818
handlers['~'] = generalSibling
@@ -94,7 +94,7 @@ function generalSibling(query, node, index, parent, state) {
9494
.done()
9595
}
9696

97-
/* Handles typeIndex and typeCount properties for every walker. */
97+
// Handles typeIndex and typeCount properties for every walker.
9898
function walkIterator(query, parent, state) {
9999
var nodes = parent.children
100100
var typeIndex = state.index ? createTypeIndex() : null
@@ -149,7 +149,7 @@ function walkIterator(query, parent, state) {
149149
pushNode()
150150
}
151151

152-
/* Stop if we’re looking for one node and it’s already found. */
152+
// Stop if we’re looking for one node and it’s already found.
153153
if (state.one && state.found) {
154154
return this
155155
}
@@ -203,7 +203,7 @@ function createTypeIndex() {
203203
counts[type] = 0
204204
}
205205

206-
/* Note: ++ is intended to be postfixed! */
206+
// Note: ++ is intended to be postfixed!
207207
return counts[type]++
208208
}
209209

0 commit comments

Comments
 (0)