UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

708 lines 21.5 kB
{ "type": "Program", "start": 0, "end": 402, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 21, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 37, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "local": { "type": "Identifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "name": "airbrakeJs" } } ], "importKind": "value", "source": { "type": "Literal", "start": 23, "end": 36, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 36 } }, "value": "airbrake-js", "rawValue": "airbrake-js", "raw": "\"airbrake-js\"" } }, { "type": "VariableDeclaration", "start": 39, "end": 145, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 6, "column": 3 } }, "declarations": [ { "type": "VariableDeclarator", "start": 43, "end": 144, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 6, "column": 2 } }, "id": { "type": "Identifier", "start": 43, "end": 51, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 12 } }, "name": "airbrake" }, "init": { "type": "NewExpression", "start": 54, "end": 144, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 6, "column": 2 } }, "callee": { "type": "Identifier", "start": 58, "end": 68, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 29 } }, "name": "airbrakeJs" }, "arguments": [ { "type": "ObjectExpression", "start": 69, "end": 143, "loc": { "start": { "line": 3, "column": 30 }, "end": { "line": 6, "column": 1 } }, "properties": [ { "type": "Property", "start": 73, "end": 90, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 4, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 73, "end": 82, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 4, "column": 11 } }, "name": "projectId" }, "value": { "type": "Literal", "start": 84, "end": 90, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 19 } }, "value": 108616, "rawValue": 108616, "raw": "108616" }, "kind": "init" }, { "type": "Property", "start": 95, "end": 141, "loc": { "start": { "line": 5, "column": 2 }, "end": { "line": 5, "column": 48 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 95, "end": 105, "loc": { "start": { "line": 5, "column": 2 }, "end": { "line": 5, "column": 12 } }, "name": "projectKey" }, "value": { "type": "Literal", "start": 107, "end": 141, "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 48 } }, "value": "046ae0791af77310d8cfe001786fad6f", "rawValue": "046ae0791af77310d8cfe001786fad6f", "raw": "\"046ae0791af77310d8cfe001786fad6f\"" }, "kind": "init" } ] } ] } } ], "kind": "let" }, { "type": "ExportDefaultDeclaration", "start": 147, "end": 401, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 20, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 162, "end": 401, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 20, "column": 1 } }, "id": { "type": "Identifier", "start": 168, "end": 174, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 27 } }, "name": "Logger" }, "superClass": null, "body": { "type": "ClassBody", "start": 175, "end": 401, "loc": { "start": { "line": 8, "column": 28 }, "end": { "line": 20, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 300, "end": 399, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 19, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 300, "end": 305, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 7 } }, "name": "error", "leadingComments": null }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 305, "end": 399, "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 19, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 306, "end": 309, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 11 } }, "name": "err" } ], "body": { "type": "BlockStatement", "start": 311, "end": 399, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 317, "end": 336, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 23 } }, "expression": { "type": "CallExpression", "start": 317, "end": 335, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 22 } }, "callee": { "type": "MemberExpression", "start": 317, "end": 330, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 17 } }, "object": { "type": "Identifier", "start": 317, "end": 324, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 11 } }, "name": "console" }, "property": { "type": "Identifier", "start": 325, "end": 330, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 17 } }, "name": "error" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 331, "end": 334, "loc": { "start": { "line": 14, "column": 18 }, "end": { "line": 14, "column": 21 } }, "name": "err" } ] } }, { "type": "IfStatement", "start": 346, "end": 395, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 18, "column": 5 } }, "test": { "type": "Identifier", "start": 350, "end": 358, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 16 } }, "name": "ENV_PROD" }, "consequent": { "type": "BlockStatement", "start": 360, "end": 395, "loc": { "start": { "line": 16, "column": 18 }, "end": { "line": 18, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 368, "end": 389, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 27 } }, "expression": { "type": "CallExpression", "start": 368, "end": 388, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 26 } }, "callee": { "type": "MemberExpression", "start": 368, "end": 383, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 21 } }, "object": { "type": "Identifier", "start": 368, "end": 376, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 14 } }, "name": "airbrake" }, "property": { "type": "Identifier", "start": 377, "end": 383, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 21 } }, "name": "notify" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 384, "end": 387, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 25 } }, "name": "err" } ] } } ] }, "alternate": null } ] } }, "leadingComments": [ { "type": "Block", "value": "*\n * Log an error\n * @param {Error|Object|String} message Either string or object containing error details\n ", "start": 179, "end": 297, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 12, "column": 5 } }, "range": [ 179, 297 ] } ] } ] }, "leadingComments": [], "trailingComments": [] } } ] }