@@ -72,7 +72,7 @@ function unist(node) {
72
72
assert . strictEqual ( typeof value , 'string' , '`value` should be a string' )
73
73
}
74
74
75
- location ( node . position )
75
+ position ( node . position )
76
76
77
77
for ( key in node ) {
78
78
if ( defined . indexOf ( key ) === - 1 ) {
@@ -139,7 +139,7 @@ function text(node) {
139
139
assert . ok ( 'value' in node , 'text should have `value`' )
140
140
}
141
141
142
- // Assert `node` is a Unist node, but neither parent nor text.
142
+ // Assert `node` is a unist node, but neither parent nor text.
143
143
function empty ( node ) {
144
144
unist ( node )
145
145
@@ -151,32 +151,32 @@ function empty(node) {
151
151
)
152
152
}
153
153
154
- // Assert `location ` is a Unist Location .
155
- function location ( location ) {
156
- if ( location != null ) {
157
- assert . ok ( object ( location ) , '`position` should be an object' )
154
+ // Assert `position ` is a unist position .
155
+ function position ( position ) {
156
+ if ( position != null ) {
157
+ assert . ok ( object ( position ) , '`position` should be an object' )
158
158
159
- position ( location . start , 'position.start' )
160
- position ( location . end , 'position.end' )
159
+ point ( position . start , 'position.start' )
160
+ point ( position . end , 'position.end' )
161
161
}
162
162
}
163
163
164
- // Assert `location ` is a Unist Location .
165
- function position ( position , name ) {
166
- if ( position != null ) {
167
- assert . ok ( object ( position ) , '`' + name + '` should be an object' )
164
+ // Assert `point ` is a unist point .
165
+ function point ( point , name ) {
166
+ if ( point != null ) {
167
+ assert . ok ( object ( point ) , '`' + name + '` should be an object' )
168
168
169
- if ( position . line != null ) {
170
- assert . ok ( 'line' in position , '`' + name + '` should have numeric `line`' )
171
- assert . ok ( position . line >= 1 , '`' + name + '.line` should be gte `1`' )
169
+ if ( point . line != null ) {
170
+ assert . ok ( 'line' in point , '`' + name + '` should have numeric `line`' )
171
+ assert . ok ( point . line >= 1 , '`' + name + '.line` should be gte `1`' )
172
172
}
173
173
174
- if ( position . column != null ) {
174
+ if ( point . column != null ) {
175
175
assert . ok (
176
- 'column' in position ,
176
+ 'column' in point ,
177
177
'`' + name + '` should have numeric `column`'
178
178
)
179
- assert . ok ( position . column >= 1 , '`' + name + '.column` should be gte `1`' )
179
+ assert . ok ( point . column >= 1 , '`' + name + '.column` should be gte `1`' )
180
180
}
181
181
}
182
182
}
0 commit comments