UNPKG

rizzo-next

Version:

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

1,199 lines (1,198 loc) 142 kB
{ "type": "Program", "start": 0, "end": 1113, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 52, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 59, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 59 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } }, "local": { "type": "Identifier", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } }, "name": "publish" } } ], "importKind": "value", "source": { "type": "Literal", "start": 20, "end": 58, "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 58 } }, "value": "../../../src/core/decorators/publish", "rawValue": "../../../src/core/decorators/publish", "raw": "\"../../../src/core/decorators/publish\"" } }, { "type": "ImportDeclaration", "start": 60, "end": 106, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 46 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 67, "end": 73, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 } }, "local": { "type": "Identifier", "start": 67, "end": 73, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 } }, "name": "postal" } } ], "importKind": "value", "source": { "type": "Literal", "start": 79, "end": 105, "loc": { "start": { "line": 2, "column": 19 }, "end": { "line": 2, "column": 45 } }, "value": "postal/lib/postal.lodash", "rawValue": "postal/lib/postal.lodash", "raw": "\"postal/lib/postal.lodash\"" } }, { "type": "VariableDeclaration", "start": 108, "end": 142, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 112, "end": 141, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 33 } }, "id": { "type": "Identifier", "start": 112, "end": 118, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 10 } }, "name": "expect" }, "init": { "type": "CallExpression", "start": 121, "end": 141, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 33 } }, "callee": { "type": "Identifier", "start": 121, "end": 128, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 20 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 129, "end": 140, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 32 } }, "value": "expect.js", "rawValue": "expect.js", "raw": "\"expect.js\"" } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 144, "end": 1112, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 51, "column": 3 } }, "expression": { "type": "CallExpression", "start": 144, "end": 1111, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 51, "column": 2 } }, "callee": { "type": "Identifier", "start": 144, "end": 152, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } }, "name": "describe" }, "arguments": [ { "type": "Literal", "start": 153, "end": 172, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 28 } }, "value": "publish decorator", "rawValue": "publish decorator", "raw": "\"publish decorator\"" }, { "type": "ArrowFunctionExpression", "start": 174, "end": 1110, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 51, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 180, "end": 1110, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 51, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 184, "end": 257, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 9, "column": 5 } }, "expression": { "type": "CallExpression", "start": 184, "end": 256, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 9, "column": 4 } }, "callee": { "type": "Identifier", "start": 184, "end": 186, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 187, "end": 210, "loc": { "start": { "line": 7, "column": 5 }, "end": { "line": 7, "column": 28 } }, "value": "should be a decorator", "rawValue": "should be a decorator", "raw": "\"should be a decorator\"" }, { "type": "ArrowFunctionExpression", "start": 212, "end": 255, "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 9, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 218, "end": 255, "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 9, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 224, "end": 251, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 31 } }, "expression": { "type": "CallExpression", "start": 224, "end": 250, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 30 } }, "callee": { "type": "MemberExpression", "start": 224, "end": 248, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 28 } }, "object": { "type": "MemberExpression", "start": 224, "end": 245, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 25 } }, "object": { "type": "MemberExpression", "start": 224, "end": 242, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 22 } }, "object": { "type": "CallExpression", "start": 224, "end": 239, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 19 } }, "callee": { "type": "Identifier", "start": 224, "end": 230, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 10 } }, "name": "expect" }, "arguments": [ { "type": "Identifier", "start": 231, "end": 238, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 18 } }, "name": "publish" } ] }, "property": { "type": "Identifier", "start": 240, "end": 242, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 22 } }, "name": "to" }, "computed": false }, "property": { "type": "Identifier", "start": 243, "end": 245, "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 25 } }, "name": "be" }, "computed": false }, "property": { "type": "Identifier", "start": 246, "end": 248, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 28 } }, "name": "ok" }, "computed": false }, "arguments": [] } } ] } } ], "_esdocTestId": 39, "_esdocTestName": "it39" } }, { "type": "ExpressionStatement", "start": 261, "end": 634, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 29, "column": 5 } }, "expression": { "type": "CallExpression", "start": 261, "end": 633, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 29, "column": 4 } }, "callee": { "type": "Identifier", "start": 261, "end": 263, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 264, "end": 290, "loc": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 31 } }, "value": "should publish a message", "rawValue": "should publish a message", "raw": "\"should publish a message\"" }, { "type": "ArrowFunctionExpression", "start": 292, "end": 632, "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 29, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 298, "end": 632, "loc": { "start": { "line": 11, "column": 39 }, "end": { "line": 29, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 304, "end": 421, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 7 } }, "declarations": [ { "type": "VariableDeclarator", "start": 308, "end": 420, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 14, "column": 6 } }, "id": { "type": "Identifier", "start": 308, "end": 318, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 18 } }, "name": "definition" }, "init": { "type": "CallExpression", "start": 321, "end": 420, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 14, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 321, "end": 350, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 50 } }, "object": { "type": "CallExpression", "start": 321, "end": 340, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 40 } }, "callee": { "type": "MemberExpression", "start": 321, "end": 335, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 35 } }, "object": { "type": "Identifier", "start": 321, "end": 327, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 27 } }, "name": "postal" }, "property": { "type": "Identifier", "start": 328, "end": 335, "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 35 } }, "name": "channel" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 336, "end": 339, "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 12, "column": 39 } }, "value": "/", "rawValue": "/", "raw": "\"/\"" } ] }, "property": { "type": "Identifier", "start": 341, "end": 350, "loc": { "start": { "line": 12, "column": 41 }, "end": { "line": 12, "column": 50 } }, "name": "subscribe" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 351, "end": 363, "loc": { "start": { "line": 12, "column": 51 }, "end": { "line": 12, "column": 63 } }, "value": "my.message", "rawValue": "my.message", "raw": "\"my.message\"" }, { "type": "ArrowFunctionExpression", "start": 365, "end": 419, "loc": { "start": { "line": 12, "column": 65 }, "end": { "line": 14, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 366, "end": 370, "loc": { "start": { "line": 12, "column": 66 }, "end": { "line": 12, "column": 70 } }, "name": "data" } ], "body": { "type": "BlockStatement", "start": 375, "end": 419, "loc": { "start": { "line": 12, "column": 75 }, "end": { "line": 14, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 383, "end": 413, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 36 } }, "expression": { "type": "CallExpression", "start": 383, "end": 412, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 383, "end": 405, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 28 } }, "object": { "type": "MemberExpression", "start": 383, "end": 402, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 25 } }, "object": { "type": "CallExpression", "start": 383, "end": 399, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 22 } }, "callee": { "type": "Identifier", "start": 383, "end": 389, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 12 } }, "name": "expect" }, "arguments": [ { "type": "MemberExpression", "start": 390, "end": 398, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 21 } }, "object": { "type": "Identifier", "start": 390, "end": 394, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 17 } }, "name": "data" }, "property": { "type": "Identifier", "start": 395, "end": 398, "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 21 } }, "name": "foo" }, "computed": false } ] }, "property": { "type": "Identifier", "start": 400, "end": 402, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 25 } }, "name": "to" }, "computed": false }, "property": { "type": "Identifier", "start": 403, "end": 405, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 28 } }, "name": "be" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 406, "end": 411, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 34 } }, "value": "bar", "rawValue": "bar", "raw": "\"bar\"" } ] } } ] } } ] } } ], "kind": "let" }, { "type": "ClassDeclaration", "start": 427, "end": 550, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 23, "column": 5 } }, "id": { "type": "Identifier", "start": 433, "end": 436, "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16,