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 b956b3a commit 9085ed4Copy full SHA for 9085ed4
index.js
@@ -3,13 +3,14 @@
3
module.exports = generated
4
5
function generated(node) {
6
- var position = optional(optional(node).position)
7
- var start = optional(position.start)
8
- var end = optional(position.end)
9
-
10
- return !start.line || !start.column || !end.line || !end.column
11
-}
12
13
-function optional(value) {
14
- return value && typeof value === 'object' ? value : {}
+ return (
+ !node ||
+ !node.position ||
+ !node.position.start ||
+ !node.position.start.line ||
+ !node.position.start.column ||
+ !node.position.end ||
+ !node.position.end.line ||
+ !node.position.end.column
15
+ )
16
}
0 commit comments