File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
module . exports = parse
4
4
5
- var dot = '.' . charCodeAt ( 0 )
6
- var hash = '#' . charCodeAt ( 0 )
5
+ var numberSign = 35 // '#'
6
+ var dot = 46 // '.'
7
7
8
8
// Create a hast element from a simple CSS selector.
9
9
function parse ( selector , defaultTagName ) {
@@ -21,7 +21,7 @@ function parse(selector, defaultTagName) {
21
21
while ( ++ index <= length ) {
22
22
code = value . charCodeAt ( index )
23
23
24
- if ( ! code || code === dot || code === hash ) {
24
+ if ( ! code || code === dot || code === numberSign ) {
25
25
subvalue = value . slice ( lastIndex , index )
26
26
27
27
if ( subvalue ) {
@@ -33,7 +33,7 @@ function parse(selector, defaultTagName) {
33
33
className = [ subvalue ]
34
34
props . className = className
35
35
}
36
- } else if ( type === hash ) {
36
+ } else if ( type === numberSign ) {
37
37
props . id = subvalue
38
38
} else {
39
39
name = subvalue
You can’t perform that action at this time.
0 commit comments