UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,605 lines (1,604 loc) 58.6 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "root", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "imported": { "type": "Identifier", "name": "root", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } } ], "source": { "type": "Literal", "value": "./root", "raw": "'./root'", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "assignImpl", "range": [ 47, 57 ], "loc": { "start": { "line": 2, "column": 16 }, "end": { "line": 2, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "target", "range": [ 58, 64 ], "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 33 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sources", "range": [ 76, 83 ], "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 15 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 86, 88 ], "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 20 } } }, "range": [ 76, 88 ], "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 20 } } } ], "kind": "var", "range": [ 72, 89 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 21 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_i", "range": [ 103, 105 ], "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 15 } } }, "init": { "type": "Literal", "value": 1, "raw": "1", "range": [ 108, 109 ], "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 19 } } }, "range": [ 103, 109 ], "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 19 } } } ], "kind": "var", "range": [ 99, 109 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 19 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "_i", "range": [ 111, 113 ], "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "arguments", "range": [ 116, 125 ], "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 35 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 126, 132 ], "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 42 } } }, "range": [ 116, 132 ], "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 42 } } }, "range": [ 111, 132 ], "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 42 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "_i", "range": [ 134, 136 ], "loc": { "start": { "line": 4, "column": 44 }, "end": { "line": 4, "column": 46 } } }, "prefix": false, "range": [ 134, 138 ], "loc": { "start": { "line": 4, "column": 44 }, "end": { "line": 4, "column": 48 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "sources", "range": [ 150, 157 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 15 } } }, "property": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "_i", "range": [ 158, 160 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 18 } } }, "right": { "type": "Literal", "value": 1, "raw": "1", "range": [ 163, 164 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 22 } } }, "range": [ 158, 164 ], "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 22 } } }, "range": [ 150, 165 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 23 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "arguments", "range": [ 168, 177 ], "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 35 } } }, "property": { "type": "Identifier", "name": "_i", "range": [ 178, 180 ], "loc": { "start": { "line": 5, "column": 36 }, "end": { "line": 5, "column": 38 } } }, "range": [ 168, 181 ], "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 39 } } }, "range": [ 150, 181 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 39 } } }, "range": [ 150, 182 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 40 } } } ], "range": [ 140, 188 ], "loc": { "start": { "line": 4, "column": 50 }, "end": { "line": 6, "column": 5 } } }, "range": [ 94, 188 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 6, "column": 5 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "len", "range": [ 197, 200 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 11 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sources", "range": [ 203, 210 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 21 } } }, "property": { "type": "Identifier", "name": "length", "range": [ 211, 217 ], "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 28 } } }, "range": [ 203, 217 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 28 } } }, "range": [ 197, 217 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 28 } } } ], "kind": "var", "range": [ 193, 218 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 29 } } }, { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "range": [ 232, 233 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 236, 237 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 18 } } }, "range": [ 232, 237 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 18 } } } ], "kind": "var", "range": [ 228, 237 ], "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 18 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "i", "range": [ 239, 240 ], "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 21 } } }, "right": { "type": "Identifier", "name": "len", "range": [ 243, 246 ], "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 27 } } }, "range": [ 239, 246 ], "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 27 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "i", "range": [ 248, 249 ], "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 30 } } }, "prefix": false, "range": [ 248, 251 ], "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 32 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 267, 273 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "sources", "range": [ 276, 283 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 28 } } }, "property": { "type": "Identifier", "name": "i", "range": [ 284, 285 ], "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 30 } } }, "range": [ 276, 286 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 31 } } }, "range": [ 267, 286 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 31 } } } ], "kind": "var", "range": [ 263, 287 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 32 } } }, { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "k", "range": [ 305, 306 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 18 } } }, "init": null, "range": [ 305, 306 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 18 } } } ], "kind": "var", "range": [ 301, 306 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 18 } } }, "right": { "type": "Identifier", "name": "source", "range": [ 310, 316 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 28 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 336, 342 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 22 } } }, "property": { "type": "Identifier", "name": "hasOwnProperty", "range": [ 343, 357 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 37 } } }, "range": [ 336, 357 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "k", "range": [ 358, 359 ], "loc": { "start": { "line": 11, "column": 38 }, "end": { "line": 11, "column": 39 } } } ], "range": [ 336, 360 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 40 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "target", "range": [ 380, 386 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 22 } } }, "property": { "type": "Identifier", "name": "k", "range": [ 387, 388 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 24 } } }, "range": [ 380, 389 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 25 } } }, "right": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "source", "range": [ 392, 398 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 34 } } }, "property": { "type": "Identifier", "name": "k", "range": [ 399, 400 ], "loc": { "start": { "line": 12, "column": 35 }, "end": { "line": 12, "column": 36 } } }, "range": [ 392, 401 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 37 } } }, "range": [ 380, 401 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 37 } } }, "range": [ 380, 402 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 38 } } } ], "range": [ 362, 416 ], "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 13, "column": 13 } } }, "alternate": null, "range": [ 332, 416 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 13, "column": 13 } } } ], "range": [ 318, 426 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 14, "column": 9 } } }, "each": false, "range": [ 296, 426 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 14, "column": 9 } } } ], "range": [ 253, 432 ], "loc": { "start": { "line": 8, "column": 34 }, "end": { "line": 15, "column": 5 } } }, "range": [ 223, 432 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 15, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "target", "range": [ 444, 450 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 17 } } }, "range": [ 437, 451 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 18 } } } ], "range": [ 66, 453 ], "loc": { "start": { "line": 2, "column": 35 }, "end": { "line": 17, "column": 1 } } }, "generator": false, "expression": false, "range": [ 38, 453 ], "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 17, "column": 1 } }, "leadingComments": [], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 31, 453 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 17, "column": 1 } } }, { "type": "EmptyStatement", "range": [ 454, 455 ], "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 18, "column": 1 } } }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "getAssign", "range": [ 472, 481 ], "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "root", "range": [ 482, 486 ], "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 30 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "LogicalExpression", "operator": "||", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "root", "range": [ 501, 505 ], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20,