UNPKG

rizzo-next

Version:

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

1,280 lines (1,279 loc) 279 kB
{ "type": "Program", "start": 0, "end": 1971, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 75, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 63, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 63 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } }, "local": { "type": "Identifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } }, "name": "subscribe" } } ], "importKind": "value", "source": { "type": "Literal", "start": 22, "end": 62, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 62 } }, "value": "../../../src/core/decorators/subscribe", "rawValue": "../../../src/core/decorators/subscribe", "raw": "\"../../../src/core/decorators/subscribe\"" } }, { "type": "ImportDeclaration", "start": 64, "end": 123, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 59 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 71, "end": 78, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 71, "end": 78, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "name": "channel" } } ], "importKind": "value", "source": { "type": "Literal", "start": 84, "end": 122, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 58 } }, "value": "../../../src/core/decorators/channel", "rawValue": "../../../src/core/decorators/channel", "raw": "\"../../../src/core/decorators/channel\"" } }, { "type": "ImportDeclaration", "start": 124, "end": 170, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 46 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 131, "end": 137, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "local": { "type": "Identifier", "start": 131, "end": 137, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "name": "postal" } } ], "importKind": "value", "source": { "type": "Literal", "start": 143, "end": 169, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 45 } }, "value": "postal/lib/postal.lodash", "rawValue": "postal/lib/postal.lodash", "raw": "\"postal/lib/postal.lodash\"" } }, { "type": "VariableDeclaration", "start": 172, "end": 206, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 176, "end": 205, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 33 } }, "id": { "type": "Identifier", "start": 176, "end": 182, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 10 } }, "name": "expect" }, "init": { "type": "CallExpression", "start": 185, "end": 205, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 33 } }, "callee": { "type": "Identifier", "start": 185, "end": 192, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 20 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 193, "end": 204, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 32 } }, "value": "expect.js", "rawValue": "expect.js", "raw": "\"expect.js\"" } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 208, "end": 1970, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 74, "column": 3 } }, "expression": { "type": "CallExpression", "start": 208, "end": 1969, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 74, "column": 2 } }, "callee": { "type": "Identifier", "start": 208, "end": 216, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } }, "name": "describe" }, "arguments": [ { "type": "Literal", "start": 217, "end": 238, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 30 } }, "value": "subscribe decorator", "rawValue": "subscribe decorator", "raw": "\"subscribe decorator\"" }, { "type": "ArrowFunctionExpression", "start": 240, "end": 1968, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 74, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 246, "end": 1968, "loc": { "start": { "line": 7, "column": 38 }, "end": { "line": 74, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 250, "end": 325, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 10, "column": 5 } }, "expression": { "type": "CallExpression", "start": 250, "end": 324, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 10, "column": 4 } }, "callee": { "type": "Identifier", "start": 250, "end": 252, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 253, "end": 276, "loc": { "start": { "line": 8, "column": 5 }, "end": { "line": 8, "column": 28 } }, "value": "should be a decorator", "rawValue": "should be a decorator", "raw": "\"should be a decorator\"" }, { "type": "ArrowFunctionExpression", "start": 278, "end": 323, "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 10, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 284, "end": 323, "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 10, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 290, "end": 319, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 33 } }, "expression": { "type": "CallExpression", "start": 290, "end": 318, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 32 } }, "callee": { "type": "MemberExpression", "start": 290, "end": 316, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 30 } }, "object": { "type": "MemberExpression", "start": 290, "end": 313, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 27 } }, "object": { "type": "MemberExpression", "start": 290, "end": 310, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 24 } }, "object": { "type": "CallExpression", "start": 290, "end": 307, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 21 } }, "callee": { "type": "Identifier", "start": 290, "end": 296, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 10 } }, "name": "expect" }, "arguments": [ { "type": "Identifier", "start": 297, "end": 306, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 20 } }, "name": "subscribe" } ] }, "property": { "type": "Identifier", "start": 308, "end": 310, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 24 } }, "name": "to" }, "computed": false }, "property": { "type": "Identifier", "start": 311, "end": 313, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 27 } }, "name": "be" }, "computed": false }, "property": { "type": "Identifier", "start": 314, "end": 316, "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 30 } }, "name": "ok" }, "computed": false }, "arguments": [] } } ] } } ], "_esdocTestId": 43, "_esdocTestName": "it43" } }, { "type": "ExpressionStatement", "start": 329, "end": 767, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 31, "column": 5 } }, "expression": { "type": "CallExpression", "start": 329, "end": 766, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 31, "column": 4 } }, "callee": { "type": "Identifier", "start": 329, "end": 331, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 332, "end": 361, "loc": { "start": { "line": 12, "column": 5 }, "end": { "line": 12, "column": 34 } }, "value": "should subscribe to a topic", "rawValue": "should subscribe to a topic", "raw": "\"should subscribe to a topic\"" }, { "type": "ArrowFunctionExpression", "start": 363, "end": 765, "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 31, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 369, "end": 765, "loc": { "start": { "line": 12, "column": 42 }, "end": { "line": 31, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 375, "end": 393, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 22 } }, "declarations": [ { "type": "VariableDeclarator", "start": 379, "end": 392, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 21 } }, "id": { "type": "Identifier", "start": 379, "end": 388, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 17 } }, "name": "callCount" }, "init": { "type": "Literal", "start": 391, "end": 392, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 21 } }, "value": 0, "rawValue": 0, "raw": "0" } } ], "kind": "let" }, { "type": "ClassDeclaration", "start": 398, "end": 638, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 24, "column": 5 } }, "id": { "type": "Identifier", "start": 404, "end": 407, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 13 } }, "name": "Foo" }, "superClass": null, "body": { "type": "ClassBody", "start": 408, "end": 638, "loc": { "start": { "line": 14, "column": 14 }, "end": { "line": 24, "column": 5 } }, "body": [ { "type": "MethodDefinition", "start": 416, "end": 465, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 17, "column": 7 } }, "computed": false, "key": { "type": "Identifier", "start": 416, "end": 427, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 17 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 427, "end": 465, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 17, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 430, "end": 465, "loc": { "start": { "line": 15, "column": 20 }, "end": { "line": 17, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 440, "end": 457, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 25 } }, "expression": { "type": "CallExpression", "start": 440, "end": 456, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } }, "callee": { "type": "MemberExpression", "start": 440, "end": 454, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 22 } }, "object": { "type": "ThisExpression", "start": 440, "end": 444, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 445, "end": 454, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 22 } }, "name": "subscribe" }, "computed": false }, "arguments": [] } } ] } } }, { "type": "MethodDefinition", "start": 510, "end": 632, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 23, "column": 7 } }, "decorators": [ { "type": "Decorator", "start": 472, "end": 503, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 37 } }, "expression": { "type": "CallExpression", "start": 473, "end": 503, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 37 } }, "callee": { "type": "Identifier", "start": 473, "end": 482, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 16 } }, "name": "subscribe" }, "arguments": [ { "type": "Literal", "start": 483, "end": 495, "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 29 } }, "value": "my.message", "rawValue": "my.message", "raw": "\"my.message\"" }, { "type": "Literal", "start": 497, "end": 502, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 36 } }, "value": "foo", "rawValue": "foo", "raw": "\"foo\"" } ] } } ], "computed": false, "key": { "type": "Identifier", "start": 510, "end": 519, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 15 } }, "name": "myMessage" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 519, "end": 632, "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 23, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 520, "end": 524, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 20 } }, "name": "data" }, { "type": "Identifier", "start": 526, "end": 529, "loc": { "start": { "line": 19, "column": 22 }, "end": { "line": 19, "column": 25 } }, "name": "env" }, { "type": "Identifier", "start": 531, "end": 534, "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 30 } }, "name": "sub" } ], "body": { "type": "BlockStatement", "start": 536, "end": 632, "loc": { "start": { "line": 19, "column": 32 }, "end": { "line": 23, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 546, "end": 576, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 38 } }, "expression": { "type": "CallExpression", "start": 546, "end": 575, "loc": { "start": { "line": 20, "column": 8 },