We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44ad57f commit 770f526Copy full SHA for 770f526
index.js
@@ -1,9 +1,7 @@
1
'use strict'
2
3
-/* Expose. */
4
module.exports = generated
5
6
-/* Detect if a node was available in the original document. */
7
function generated(node) {
8
var position = optional(optional(node).position)
9
var start = optional(position.start)
@@ -12,8 +10,6 @@ function generated(node) {
12
10
return !start.line || !start.column || !end.line || !end.column
13
11
}
14
15
-/* Return `value` if it’s an object, an empty object
16
- * otherwise. */
17
function optional(value) {
18
return value && typeof value === 'object' ? value : {}
19
0 commit comments