@theopenweb/js-sensor
Version:
JavaScript sensor library for native input sensors.
2,178 lines (2,177 loc) • 50.5 kB
JSON
{
"type": "File",
"start": 0,
"end": 389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
},
"sourceType": "module",
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 50
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 49
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 19
},
"identifierName": "SensorHandler"
},
"name": "SensorHandler"
},
"init": {
"type": "CallExpression",
"start": 22,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 49
}
},
"callee": {
"type": "Identifier",
"start": 22,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 29
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 30,
"end": 48,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 48
}
},
"extra": {
"rawValue": "./sensor-handler",
"raw": "'./sensor-handler'"
},
"value": "./sensor-handler"
}
]
}
}
],
"kind": "const",
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Wrapper for main class\r\n * Add additional methods here not to do with sensors if required.\r\n ",
"start": 54,
"end": 157,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
]
},
{
"type": "ClassDeclaration",
"start": 159,
"end": 244,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 11,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 165,
"end": 173,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 14
},
"identifierName": "JsSensor"
},
"name": "JsSensor",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 182,
"end": 195,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 36
},
"identifierName": "SensorHandler"
},
"name": "SensorHandler"
},
"body": {
"type": "ClassBody",
"start": 195,
"end": 244,
"loc": {
"start": {
"line": 7,
"column": 36
},
"end": {
"line": 11,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 202,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 10,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 202,
"end": 213,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 215,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 10,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 226,
"end": 234,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 226,
"end": 233,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 226,
"end": 231,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 13
}
}
},
"arguments": []
}
}
],
"directives": []
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Wrapper for main class\r\n * Add additional methods here not to do with sensors if required.\r\n ",
"start": 54,
"end": 157,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
]
},
{
"type": "IfStatement",
"start": 248,
"end": 318,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
},
"test": {
"type": "BinaryExpression",
"start": 251,
"end": 280,
"loc": {
"start": {
"line": 13,
"column": 3
},
"end": {
"line": 13,
"column": 32
}
},
"left": {
"type": "UnaryExpression",
"start": 251,
"end": 264,
"loc": {
"start": {
"line": 13,
"column": 3
},
"end": {
"line": 13,
"column": 16
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 258,
"end": 264,
"loc": {
"start": {
"line": 13,
"column": 10
},
"end": {
"line": 13,
"column": 16
},
"identifierName": "window"
},
"name": "window"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "!==",
"right": {
"type": "StringLiteral",
"start": 269,
"end": 280,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 32
}
},
"extra": {
"rawValue": "undefined",
"raw": "'undefined'"
},
"value": "undefined"
}
},
"consequent": {
"type": "BlockStatement",
"start": 281,
"end": 318,
"loc": {
"start": {
"line": 13,
"column": 33
},
"end": {
"line": 15,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 288,
"end": 315,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 288,
"end": 314,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 288,
"end": 303,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 288,
"end": 294,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 10
},
"identifierName": "window"
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 14,
"column": 11
},
"end": {
"line": 14,
"column": 19
},
"identifierName": "JsSensor"
},
"name": "JsSensor"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 306,
"end": 314,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 30
},
"identifierName": "JsSensor"
},
"name": "JsSensor"
}
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "IfStatement",
"start": 320,
"end": 389,
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
},
"test": {
"type": "BinaryExpression",
"start": 323,
"end": 352,
"loc": {
"start": {
"line": 16,
"column": 3
},
"end": {
"line": 16,
"column": 32
}
},
"left": {
"type": "UnaryExpression",
"start": 323,
"end": 336,
"loc": {
"start": {
"line": 16,
"column": 3
},
"end": {
"line": 16,
"column": 16
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 330,
"end": 336,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 16
},
"identifierName": "module"
},
"name": "module"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "!==",
"right": {
"type": "StringLiteral",
"start": 341,
"end": 352,
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 32
}
},
"extra": {
"rawValue": "undefined",
"raw": "'undefined'"
},
"value": "undefined"
}
},
"consequent": {
"type": "BlockStatement",
"start": 353,
"end": 389,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 18,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 360,
"end": 386,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 360,
"end": 385,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 360,
"end": 374,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 18
}
},
"object": {
"type": "Identifier",
"start": 360,
"end": 366,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 10
},
"identifierName": "module"
},
"name": "module"
},
"property": {
"type": "Identifier",
"start": 367,
"end": 374,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 18
},
"identifierName": "exports"
},
"name": "exports"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 377,
"end": 385,
"loc": {
"start": {
"line": 17,
"column": 21
},
"end": {
"line": 17,
"column": 29
},
"identifierName": "JsSensor"
},
"name": "JsSensor"
}
}
}
],
"directives": []
},
"alternate": null
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\r\n * Wrapper for main class\r\n * Add additional methods here not to do with sensors if required.\r\n ",
"start": 54,
"end": 157,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
],
"tokens": [
{
"type": {
"label": "const",
"keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "const",
"start": 0,
"end": 5,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "SensorHandler",
"start": 6,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 19
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 20,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "require",
"start": 22,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 29
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 29,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 30
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./sensor-handler",
"start": 30,
"end": 48,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 48
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 48,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 49
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 49,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 49
},
"end": {
"line": 1,
"column": 50
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Wrapper for main class\r\n * Add additional methods here not to do with sensors if required.\r\n ",
"start": 54,
"end": 157,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
},
{
"type": {
"label": "class",
"keyword": "class",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "class",
"start": 159,
"end": 164,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "JsSensor",
"start": 165,
"end": 173,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 14
}
}
},
{
"type": {
"label": "extends",
"keyword": "extends",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "extends",
"start": 174,
"end": 181,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "SensorHandler",
"start": 182,
"end": 195,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 36
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 195,
"end": 196,
"loc": {
"start": {
"line": 7,
"column": 36
},
"end": {
"line": 7,
"column": 37
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 202,
"end": 213,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 213,
"end": 214,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 16
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 214,
"end": 215,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 17
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 215,
"end": 216,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 18
}
}
},
{
"type": {
"label": "super",
"keyword": "super",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "super",
"start": 226,
"end": 231,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 13
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 231,
"end": 232,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 14
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 232,
"end": 233,
"loc": {
"start": {
"line": 9,
"column": 14
},
"end": {
"line": 9,
"column": 15
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 233,
"end": 234,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 16
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 240,
"end": 241,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 5
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 243,
"end": 244,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 1
}
}
},
{
"type": {
"label": "if",
"keyword": "if",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "if",
"start": 248,
"end": 250,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 2
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 250,
"end": 251,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 3
}
}
},
{
"type": {
"label": "typeof",
"keyword": "typeof",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "typeof",
"start": 251,
"end": 257,
"loc": {
"start": {
"line": 13,
"column": 3
},
"end": {
"line": 13,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "window",
"start": 258,
"end": 264,
"loc": {
"start": {
"line": 13,
"column": 10
},
"end": {
"line": 13,
"column": 16
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "!==",
"start": 265,
"end": 268,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 20
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "undefined",
"start": 269,
"end": 280,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 32
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 280,
"end": 281,
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 33
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 281,
"end": 282,
"loc": {
"start": {
"line": 13,
"column": 33
},
"end": {
"line": 13,
"column": 34
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "window",
"start": 288,
"end": 294,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 10
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 294,
"end": 295,
"loc": {
"start": {
"line": 14,
"column": 10
},
"end": {
"line": 14,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "JsSensor",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 14,
"column": 11
},
"end": {
"line": 14,
"column": 19
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 304,
"end": 305,
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "JsSensor",
"start": 306,
"end": 314,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 30
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 314,
"end": 315,
"loc": {
"start": {
"line": 14,
"column": 30
},
"end": {
"line": 14,
"column": 31
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 317,
"end": 318,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 1
}
}
},
{
"type": {
"label": "if",
"keyword": "if",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "if",
"start": 320,
"end": 322,
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 16,
"column": 2
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 322,
"end": 323,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 3
}
}
},
{
"type": {
"label": "typeof",
"keyword": "typeof",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "typeof",
"start": 323,
"end": 329,
"loc": {
"start": {
"line": 16,
"column": 3
},
"end": {
"line": 16,
"column": 9
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "module",
"start": 330,
"end": 336,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 16
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "!==",
"start": 337,
"end": 340,
"loc": {
"start": {
"line": 16,
"column": 17
},
"end": {
"line": 16,
"column": 20
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "undefined",
"start": 341,
"end": 352,
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 32
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 352,
"end": 353,
"loc": {
"start": {
"line": 16,
"column": 32
},
"end": {
"line": 16,
"column": 33
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 353,
"end": 354,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 34
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "module",
"start": 360,
"end": 366,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 10
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 366,
"end": 367,
"loc": {
"start": {
"line": 17,
"column": 10
},
"end": {
"line": 17,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "exports",
"start": 367,
"end": 374,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 18
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 375,
"end": 376,
"loc": {
"start": {
"line": 17,
"column": 19
},
"end": {
"line": 17,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "JsSensor",
"start": 377,
"end": 385,
"loc": {
"start": {
"line": 17,
"column": 21
},
"end": {
"line": 17,
"column": 29
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 385,
"end": 386,
"loc": {
"start": {
"line": 17,
"column": 29
},
"end": {
"line": 17,
"column": 30
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 388,
"end": 389,
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,