@@ -10,7 +10,7 @@ let styleData = 1,
10
10
attributeData = 4 ,
11
11
keyData = 7 ;
12
12
13
- exports . createElementNode = function ( tag ) {
13
+ export function createElementNode ( tag ) {
14
14
return function ( nodeData ) {
15
15
return function ( potentialChildren ) {
16
16
let children = potentialChildren ,
@@ -31,9 +31,9 @@ exports.createElementNode = function (tag) {
31
31
} ;
32
32
} ;
33
33
} ;
34
- } ;
34
+ }
35
35
36
- exports . createDatalessElementNode = function ( tag ) {
36
+ export function createDatalessElementNode ( tag ) {
37
37
return function ( potentialChildren ) {
38
38
let children = potentialChildren ,
39
39
text = undefined ;
@@ -52,9 +52,9 @@ exports.createDatalessElementNode = function (tag) {
52
52
text : text
53
53
} ;
54
54
} ;
55
- } ;
55
+ }
56
56
57
- exports . createSingleElementNode = function ( tag ) {
57
+ export function createSingleElementNode ( tag ) {
58
58
return function ( nodeData ) {
59
59
return {
60
60
nodeType : elementNode ,
@@ -63,34 +63,34 @@ exports.createSingleElementNode = function (tag) {
63
63
nodeData : fromNodeData ( nodeData )
64
64
} ;
65
65
} ;
66
- } ;
66
+ }
67
67
68
- exports . createEmptyElement = function ( tag ) {
68
+ export function createEmptyElement ( tag ) {
69
69
return {
70
70
nodeType : tag . trim ( ) . toLowerCase ( ) === 'svg' ? svgNode : elementNode ,
71
71
node : undefined ,
72
72
tag : tag ,
73
73
nodeData : { }
74
74
} ;
75
- } ;
75
+ }
76
76
77
- exports . createFragmentNode = function ( children ) {
77
+ export function createFragmentNode ( children ) {
78
78
return {
79
79
nodeType : fragmentNode ,
80
80
node : undefined ,
81
81
children : children
82
82
} ;
83
- } ;
83
+ }
84
84
85
- exports . text = function ( value ) {
85
+ export function text ( value ) {
86
86
return {
87
87
nodeType : textNode ,
88
88
node : undefined ,
89
89
text : value
90
90
} ;
91
- } ;
91
+ }
92
92
93
- exports . createLazyNode = function ( nodeData ) {
93
+ export function createLazyNode ( nodeData ) {
94
94
return function ( render ) {
95
95
return function ( arg ) {
96
96
let key = nodeData [ 0 ] ;
@@ -105,9 +105,9 @@ exports.createLazyNode = function (nodeData) {
105
105
} ;
106
106
} ;
107
107
} ;
108
- } ;
108
+ }
109
109
110
- exports . createManagedNode = function ( render ) {
110
+ export function createManagedNode ( render ) {
111
111
return function ( nodeData ) {
112
112
return function ( arg ) {
113
113
return {
@@ -120,9 +120,9 @@ exports.createManagedNode = function (render) {
120
120
} ;
121
121
} ;
122
122
} ;
123
- } ;
123
+ }
124
124
125
- exports . createDatalessManagedNode = function ( render ) {
125
+ export function createDatalessManagedNode ( render ) {
126
126
return function ( arg ) {
127
127
return {
128
128
nodeType : managedNode ,
@@ -133,9 +133,9 @@ exports.createDatalessManagedNode = function (render) {
133
133
arg : arg
134
134
} ;
135
135
} ;
136
- } ;
136
+ }
137
137
138
- exports . createSvgNode = function ( nodeData ) {
138
+ export function createSvgNode ( nodeData ) {
139
139
return function ( children ) {
140
140
return {
141
141
nodeType : svgNode ,
@@ -145,26 +145,26 @@ exports.createSvgNode = function (nodeData) {
145
145
children : asSvg ( children )
146
146
} ;
147
147
} ;
148
- } ;
148
+ }
149
149
150
- exports . createDatalessSvgNode = function ( children ) {
150
+ export function createDatalessSvgNode ( children ) {
151
151
return {
152
152
nodeType : svgNode ,
153
153
node : undefined ,
154
154
tag : 'svg' ,
155
155
nodeData : { } ,
156
156
children : asSvg ( children )
157
157
} ;
158
- } ;
158
+ }
159
159
160
- exports . createSingleSvgNode = function ( nodeData ) {
160
+ export function createSingleSvgNode ( nodeData ) {
161
161
return {
162
162
nodeType : svgNode ,
163
163
node : undefined ,
164
164
tag : 'svg' ,
165
165
nodeData : fromNodeData ( nodeData )
166
166
} ;
167
- } ;
167
+ }
168
168
169
169
function asSvg ( elements ) {
170
170
for ( let e of elements ) {
0 commit comments