UNPKG

rizzo-next

Version:

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

312 lines 9.85 kB
{ "type": "Program", "start": 0, "end": 786, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 31, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 670, "end": 785, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 30, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 685, "end": 785, "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 30, "column": 1 } }, "id": { "type": "Identifier", "start": 694, "end": 701, "loc": { "start": { "line": 26, "column": 24 }, "end": { "line": 26, "column": 31 } }, "name": "channel", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 702, "end": 713, "loc": { "start": { "line": 26, "column": 32 }, "end": { "line": 26, "column": 43 } }, "name": "channelName" } ], "body": { "type": "BlockStatement", "start": 715, "end": 785, "loc": { "start": { "line": 26, "column": 45 }, "end": { "line": 30, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 719, "end": 783, "loc": { "start": { "line": 27, "column": 2 }, "end": { "line": 29, "column": 4 } }, "argument": { "type": "FunctionExpression", "start": 726, "end": 782, "loc": { "start": { "line": 27, "column": 9 }, "end": { "line": 29, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 735, "end": 741, "loc": { "start": { "line": 27, "column": 18 }, "end": { "line": 27, "column": 24 } }, "name": "target" } ], "body": { "type": "BlockStatement", "start": 743, "end": 782, "loc": { "start": { "line": 27, "column": 26 }, "end": { "line": 29, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 749, "end": 778, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 749, "end": 777, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 749, "end": 763, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 18 } }, "object": { "type": "Identifier", "start": 749, "end": 755, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 10 } }, "name": "target" }, "property": { "type": "Identifier", "start": 756, "end": 763, "loc": { "start": { "line": 28, "column": 11 }, "end": { "line": 28, "column": 18 } }, "name": "channel" }, "computed": false }, "right": { "type": "Identifier", "start": 766, "end": 777, "loc": { "start": { "line": 28, "column": 21 }, "end": { "line": 28, "column": 32 } }, "name": "channelName" } } } ] } } } ] }, "leadingComments": [ { "type": "Block", "value": "*\n * Sets up the channel for subcriptions. \n * Keep in mind that after you use it, all other subscriptions underneath will use the same channel\n * @see subscribe\n * @param {String} channelName Channel name for the class\n * @example\n * import \"publish\" from \"path/to/core/decorators/publish\"\n * \n * class FooComponent () {\n * @subscribe(\"foo.some.other\")\n * @channel(\"foobar\")\n * anotherMethod() {\n * // ...\n * }\n * @subscribe(\"foo.yet.another\")\n * anotherMethod() {\n * // Still on the \"foobar channel\"\n * }\n * @subscribe(\"foo.yet.another\")\n * @channel(\"another\")\n * anotherMethod() {\n * // Now we're on another channel\n * }\n * }\n ", "start": 0, "end": 669, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 25, "column": 3 } }, "range": [ 0, 669 ] } ], "trailingComments": [] }, "leadingComments": [ { "type": "Block", "value": "*\n * Sets up the channel for subcriptions. \n * Keep in mind that after you use it, all other subscriptions underneath will use the same channel\n * @see subscribe\n * @param {String} channelName Channel name for the class\n * @example\n * import \"publish\" from \"path/to/core/decorators/publish\"\n * \n * class FooComponent () {\n * @subscribe(\"foo.some.other\")\n * @channel(\"foobar\")\n * anotherMethod() {\n * // ...\n * }\n * @subscribe(\"foo.yet.another\")\n * anotherMethod() {\n * // Still on the \"foobar channel\"\n * }\n * @subscribe(\"foo.yet.another\")\n * @channel(\"another\")\n * anotherMethod() {\n * // Now we're on another channel\n * }\n * }\n ", "start": 0, "end": 669, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 25, "column": 3 } }, "range": [ 0, 669 ] } ] } ] }