UNPKG

@xailabs/altx

Version:

Flux flavor based on alt.js

1,001 lines (1,000 loc) 105 kB
{ "type": "File", "start": 0, "end": 528, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 22, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 528, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 22, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 51, "end": 526, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 21, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 66, "end": 526, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 21, "column": 1 } }, "id": { "type": "Identifier", "start": 75, "end": 82, "loc": { "start": { "line": 4, "column": 24 }, "end": { "line": 4, "column": 31 }, "identifierName": "flatten" }, "name": "flatten", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "RestElement", "start": 83, "end": 90, "loc": { "start": { "line": 4, "column": 32 }, "end": { "line": 4, "column": 39 } }, "argument": { "type": "Identifier", "start": 86, "end": 90, "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 39 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 92, "end": 526, "loc": { "start": { "line": 4, "column": 41 }, "end": { "line": 21, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 99, "end": 523, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 20, "column": 11 } }, "argument": { "type": "CallExpression", "start": 106, "end": 522, "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 20, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 106, "end": 117, "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 22 } }, "object": { "type": "Identifier", "start": 106, "end": 110, "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 15 }, "identifierName": "args" }, "name": "args" }, "property": { "type": "Identifier", "start": 111, "end": 117, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 22 }, "identifierName": "reduce" }, "name": "reduce" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 118, "end": 517, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 20, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 119, "end": 125, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 30 }, "identifierName": "result" }, "name": "result" }, { "type": "Identifier", "start": 127, "end": 130, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 35 }, "identifierName": "arg" }, "name": "arg" } ], "body": { "type": "BlockStatement", "start": 135, "end": 517, "loc": { "start": { "line": 5, "column": 40 }, "end": { "line": 20, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 146, "end": 486, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 18, "column": 9 } }, "test": { "type": "CallExpression", "start": 150, "end": 168, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 30 } }, "callee": { "type": "MemberExpression", "start": 150, "end": 163, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 25 } }, "object": { "type": "Identifier", "start": 150, "end": 155, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 17 }, "identifierName": "Array" }, "name": "Array" }, "property": { "type": "Identifier", "start": 156, "end": 163, "loc": { "start": { "line": 6, "column": 18 }, "end": { "line": 6, "column": 25 }, "identifierName": "isArray" }, "name": "isArray" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 164, "end": 167, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 29 }, "identifierName": "arg" }, "name": "arg" } ] }, "consequent": { "type": "BlockStatement", "start": 170, "end": 428, "loc": { "start": { "line": 6, "column": 32 }, "end": { "line": 15, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 185, "end": 417, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 14, "column": 15 } }, "expression": { "type": "CallExpression", "start": 185, "end": 416, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 14, "column": 14 } }, "callee": { "type": "MemberExpression", "start": 185, "end": 196, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 23 } }, "object": { "type": "Identifier", "start": 185, "end": 188, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 15 }, "identifierName": "arg" }, "name": "arg" }, "property": { "type": "Identifier", "start": 189, "end": 196, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 23 }, "identifierName": "forEach" }, "name": "forEach" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 197, "end": 415, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 14, "column": 13 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 197, "end": 198, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 25 }, "identifierName": "e" }, "name": "e" } ], "body": { "type": "BlockStatement", "start": 202, "end": 415, "loc": { "start": { "line": 7, "column": 29 }, "end": { "line": 14, "column": 13 } }, "body": [ { "type": "IfStatement", "start": 221, "end": 400, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 13, "column": 17 } }, "test": { "type": "CallExpression", "start": 225, "end": 241, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 36 } }, "callee": { "type": "MemberExpression", "start": 225, "end": 238, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 33 } }, "object": { "type": "Identifier", "start": 225, "end": 230, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 25 }, "identifierName": "Array" }, "name": "Array" }, "property": { "type": "Identifier", "start": 231, "end": 238, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 33 }, "identifierName": "isArray" }, "name": "isArray" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 239, "end": 240, "loc": { "start": { "line": 8, "column": 34 }, "end": { "line": 8, "column": 35 }, "identifierName": "e" }, "name": "e" } ] }, "consequent": { "type": "BlockStatement", "start": 243, "end": 320, "loc": { "start": { "line": 8, "column": 38 }, "end": { "line": 10, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 266, "end": 301, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 55 } }, "expression": { "type": "AssignmentExpression", "start": 266, "end": 300, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 54 } }, "operator": "=", "left": { "type": "Identifier", "start": 266, "end": 272, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 26 }, "identifierName": "result" }, "name": "result" }, "right": { "type": "CallExpression", "start": 275, "end": 300, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 275, "end": 288, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 42 } }, "object": { "type": "Identifier", "start": 275, "end": 281, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 35 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 282, "end": 288, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 9, "column": 42 }, "identifierName": "concat" }, "name": "concat" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 289, "end": 299, "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 53 } }, "callee": { "type": "Identifier", "start": 289, "end": 296, "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 50 }, "identifierName": "flatten" }, "name": "flatten" }, "arguments": [ { "type": "Identifier", "start": 297, "end": 298, "loc": { "start": { "line": 9, "column": 51 }, "end": { "line": 9, "column": 52 }, "identifierName": "e" }, "name": "e" } ] } ] } } } ], "directives": [] }, "alternate": { "type": "BlockStatement", "start": 343, "end": 400, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 13, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 366, "end": 381, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 35 } }, "expression": { "type": "CallExpression", "start": 366, "end": 380, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 34 } }, "callee": { "type": "MemberExpression", "start": 366, "end": 377, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 31 } }, "object": { "type": "Identifier", "start": 366, "end": 372, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 26 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 373, "end": 377, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 31 }, "identifierName": "push" }, "name": "push" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 378, "end": 379, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 33 }, "identifierName": "e" }, "name": "e" } ] } } ], "directives": [] } } ], "directives": [] } } ] } } ], "directives": [] }, "alternate": { "type": "BlockStatement", "start": 443, "end": 486, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 18, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 458, "end": 475, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 29 } }, "expression": { "type": "CallExpression", "start": 458, "end": 474, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 458, "end": 469, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 23 } }, "object": { "type": "Identifier", "start": 458, "end": 464, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 18 },