Skip to content

Commit e6b5244

Browse files
committed
Refactor comments
1 parent ae038d9 commit e6b5244

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

factory.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = factory
1111
function factory(schema, defaultTagName) {
1212
return h
1313

14-
/* Hyperscript compatible DSL for creating virtual hast trees. */
14+
// Hyperscript compatible DSL for creating virtual hast trees.
1515
function h(selector, properties) {
1616
var node = parseSelector(selector, defaultTagName)
1717
var children = Array.prototype.slice.call(arguments, 2)
@@ -43,7 +43,7 @@ function factory(schema, defaultTagName) {
4343
var property
4444
var result
4545

46-
/* Ignore nully and NaN values. */
46+
// Ignore nully and NaN values.
4747
if (value === null || value === undefined || value !== value) {
4848
return
4949
}
@@ -52,7 +52,7 @@ function factory(schema, defaultTagName) {
5252
property = info.property
5353
result = value
5454

55-
/* Handle list values. */
55+
// Handle list values.
5656
if (typeof result === 'string') {
5757
if (info.spaceSeparated) {
5858
result = spaces(result)
@@ -63,12 +63,12 @@ function factory(schema, defaultTagName) {
6363
}
6464
}
6565

66-
/* Accept `object` on style. */
66+
// Accept `object` on style.
6767
if (property === 'style' && typeof value !== 'string') {
6868
result = style(result)
6969
}
7070

71-
/* Class-names (which can be added both on the `selector` and here). */
71+
// Class-names (which can be added both on the `selector` and here).
7272
if (property === 'className' && properties.className) {
7373
result = properties.className.concat(result)
7474
}
@@ -137,7 +137,7 @@ function addChild(nodes, value) {
137137
nodes.push(value)
138138
}
139139

140-
/* Parse a (list of) primitives. */
140+
// Parse a (list of) primitives.
141141
function parsePrimitives(info, name, value) {
142142
var index
143143
var length
@@ -158,7 +158,7 @@ function parsePrimitives(info, name, value) {
158158
return result
159159
}
160160

161-
/* Parse a single primitives. */
161+
// Parse a single primitives.
162162
function parsePrimitive(info, name, value) {
163163
var result = value
164164

@@ -167,7 +167,7 @@ function parsePrimitive(info, name, value) {
167167
result = Number(result)
168168
}
169169
} else if (info.boolean || info.overloadedBoolean) {
170-
/* Accept `boolean` and `string`. */
170+
// Accept `boolean` and `string`.
171171
if (
172172
typeof result === 'string' &&
173173
(result === '' || normalize(value) === normalize(name))

0 commit comments

Comments
 (0)