UNPKG

rizzo-next

Version:

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

1,291 lines (1,290 loc) 148 kB
{ "type": "Program", "start": 0, "end": 2780, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 101, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 46, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "local": { "type": "Identifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "name": "postal" } } ], "importKind": "value", "source": { "type": "Literal", "start": 19, "end": 45, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 45 } }, "value": "postal/lib/postal.lodash", "rawValue": "postal/lib/postal.lodash", "raw": "\"postal/lib/postal.lodash\"" } }, { "type": "ImportDeclaration", "start": 47, "end": 89, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 42 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 54, "end": 58, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 11 } }, "local": { "type": "Identifier", "start": 54, "end": 58, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 11 } }, "name": "each" } } ], "importKind": "value", "source": { "type": "Literal", "start": 64, "end": 88, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 41 } }, "value": "lodash/collection/each", "rawValue": "lodash/collection/each", "raw": "\"lodash/collection/each\"" } }, { "type": "VariableDeclaration", "start": 91, "end": 108, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "start": 95, "end": 107, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 16 } }, "id": { "type": "Identifier", "start": 95, "end": 96, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 5 } }, "name": "_" }, "init": { "type": "ObjectExpression", "start": 99, "end": 107, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 16 } }, "properties": [ { "type": "Property", "start": 101, "end": 105, "loc": { "start": { "line": 4, "column": 10 }, "end": { "line": 4, "column": 14 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 101, "end": 105, "loc": { "start": { "line": 4, "column": 10 }, "end": { "line": 4, "column": 14 } }, "name": "each" }, "kind": "init", "value": { "type": "Identifier", "start": 101, "end": 105, "loc": { "start": { "line": 4, "column": 10 }, "end": { "line": 4, "column": 14 } }, "name": "each" } } ] } } ], "kind": "let" }, { "type": "FunctionDeclaration", "start": 110, "end": 819, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 33, "column": 1 } }, "id": { "type": "Identifier", "start": 119, "end": 137, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 27 } }, "name": "addSubscribeMethod" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 138, "end": 144, "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 34 } }, "name": "target" } ], "body": { "type": "BlockStatement", "start": 146, "end": 819, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 33, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 150, "end": 168, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 20 } }, "declarations": [ { "type": "VariableDeclarator", "start": 154, "end": 167, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 19 } }, "id": { "type": "Identifier", "start": 154, "end": 167, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 19 } }, "name": "subscriptions" }, "init": null } ], "kind": "let" }, { "type": "IfStatement", "start": 171, "end": 245, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 10, "column": 3 } }, "test": { "type": "UnaryExpression", "start": 175, "end": 226, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 57 } }, "operator": "!", "prefix": true, "argument": { "type": "AssignmentExpression", "start": 177, "end": 225, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 56 } }, "operator": "=", "left": { "type": "Identifier", "start": 177, "end": 190, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 21 } }, "name": "subscriptions" }, "right": { "type": "MemberExpression", "start": 193, "end": 225, "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 56 } }, "object": { "type": "MemberExpression", "start": 193, "end": 211, "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 42 } }, "object": { "type": "Identifier", "start": 193, "end": 199, "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 30 } }, "name": "target" }, "property": { "type": "Identifier", "start": 200, "end": 211, "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 42 } }, "name": "constructor" }, "computed": false }, "property": { "type": "Identifier", "start": 212, "end": 225, "loc": { "start": { "line": 8, "column": 43 }, "end": { "line": 8, "column": 56 } }, "name": "subscriptions" }, "computed": false }, "parenthesizedExpression": true } }, "consequent": { "type": "BlockStatement", "start": 228, "end": 245, "loc": { "start": { "line": 8, "column": 59 }, "end": { "line": 10, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 234, "end": 241, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 11 } }, "argument": null } ] }, "alternate": null }, { "type": "ExpressionStatement", "start": 249, "end": 806, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 30, "column": 4 } }, "expression": { "type": "AssignmentExpression", "start": 249, "end": 805, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 30, "column": 3 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 249, "end": 265, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 18 } }, "object": { "type": "Identifier", "start": 249, "end": 255, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 8 } }, "name": "target" }, "property": { "type": "Identifier", "start": 256, "end": 265, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 18 } }, "name": "subscribe" }, "computed": false }, "right": { "type": "FunctionExpression", "start": 268, "end": 805, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 30, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 279, "end": 805, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 30, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 285, "end": 316, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 35 } }, "declarations": [ { "type": "VariableDeclarator", "start": 289, "end": 315, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 34 } }, "id": { "type": "Identifier", "start": 289, "end": 310, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 29 } }, "name": "subscriptionInstances" }, "init": { "type": "ArrayExpression", "start": 313, "end": 315, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 34 } }, "elements": [] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 322, "end": 744, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 27, "column": 7 } }, "expression": { "type": "CallExpression", "start": 322, "end": 743, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 27, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 322, "end": 328, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 10 } }, "object": { "type": "Identifier", "start": 322, "end": 323, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 5 } }, "name": "_" }, "property": { "type": "Identifier", "start": 324, "end": 328, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 10 } }, "name": "each" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 329, "end": 342, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 24 } }, "name": "subscriptions" }, { "type": "ArrowFunctionExpression", "start": 344, "end": 742, "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 27, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 345, "end": 350, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 32 } }, "name": "topic" } ], "body": { "type": "BlockStatement", "start": 355, "end": 742, "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 27, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 363, "end": 736, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 26, "column": 9 } }, "expression": { "type": "CallExpression", "start": 363, "end": 735, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 26, "column": 8 } }, "callee": { "type": "MemberExpression", "start": 363, "end": 369, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 12 } }, "object": { "type": "Identifier", "start": 363, "end": 364, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 7 } }, "name": "_" }, "property": { "type": "Identifier", "start": 365, "end": 369, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } }, "name": "each" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 370, "end": 375, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 18 } }, "name": "topic" }, { "type": "ArrowFunctionExpression", "start": 377, "end": 734, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 26, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 378, "end": 381, "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 24 } }, "name": "sub" } ], "body": { "type": "BlockStatement", "start": 386, "end": 734, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 26, "column": 7 } }, "body": [ { "type": "VariableDeclaration", "start": 396, "end": 407, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 19 } }, "declarations": [ { "type": "VariableDeclarator", "start": 400, "end": 406, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 18 } }, "id": { "type": "Identifier", "start": 400, "end": 406, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 18 } }, "name": "subDef" }, "init": null } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 416, "end": 726, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 25, "column": 10 } }, "expression": { "type": "CallExpression", "start": 416, "end": 725, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 25, "column": 9 } }, "callee": { "type": "MemberExpression", "start": 416, "end": 442, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 34 } }, "object": { "type": "Identifier", "start": 416, "end": 437, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 29 } }, "name": "subscriptionInstances" }, "property": { "type": "Identifier", "start": 438, "end": 442, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 34 } }, "name": "push" }, "computed": false }, "arguments": [ { "type": "AssignmentExpression", "start": 455, "end": 714, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 24, "column": 24 } }, "operator": "=", "left": { "type": "Identifier", "start": 455, "end": 461, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 17 } }, "name": "subDef" }, "right": { "type": "CallExpression", "start": 464, "end": 714, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 24, "column": 24 } }, "callee": { "type": "MemberExpression", "start": 464, "end": 708, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 24, "column": 18 } }, "object": { "type": "CallExpression", "start": 464, "end": 689, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 23, "column": 12 } }, "callee": { "type": "MemberExpression", "start": 464, "end": 512, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 20, "column": 20 } }, "object": { "type": "CallExpression", "start": 464, "end": 491, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 47 } }, "callee": { "type": "MemberExpression", "start": 464, "end": 478, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 34 } }, "object": { "type": "Identifier", "start": 464, "end": 470, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 26 } }, "name": "postal" }, "property": { "type": "Identifier", "start": 471, "end": 478, "loc": { "start": {