UNPKG

dirtybomb

Version:
1,260 lines (1,259 loc) 408 kB
{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 42, 54 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 12 } } }, "range": [ 42, 55 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 13 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Created by austin on 6/22/16.\n ", "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 3 } } } ] }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "chai", "range": [ 63, 67 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 11 } } }, "range": [ 63, 67 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 11 } } } ], "source": { "type": "Literal", "value": "chai", "raw": "'chai'", "range": [ 73, 79 ], "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 23 } } }, "range": [ 56, 80 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 24 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "db", "range": [ 88, 90 ], "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 8 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 93, 100 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 18 } } }, "arguments": [ { "type": "Literal", "value": "../dist/Dirtybomb", "raw": "'../dist/Dirtybomb'", "range": [ 101, 120 ], "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 38 } } } ], "range": [ 93, 121 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 39 } } }, "range": [ 88, 121 ], "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 39 } } } ], "kind": "const", "range": [ 82, 122 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 40 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "chai", "range": [ 124, 128 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 4 } } }, "property": { "type": "Identifier", "name": "should", "range": [ 129, 135 ], "loc": { "start": { "line": 10, "column": 5 }, "end": { "line": 10, "column": 11 } } }, "range": [ 124, 135 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 11 } } }, "arguments": [], "range": [ 124, 137 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 13 } } }, "range": [ 124, 138 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 14 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 140, 148 ], "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "DynamicGaussianPuff", "raw": "\"DynamicGaussianPuff\"", "range": [ 149, 170 ], "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 30 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "puff", "range": [ 193, 197 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "init": null, "range": [ 193, 197 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } } ], "kind": "let", "range": [ 189, 198 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 204, 212 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 12 } } }, "arguments": [ { "type": "Literal", "value": "Constructors", "raw": "\"Constructors\"", "range": [ 213, 227 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 27 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "atm", "range": [ 249, 252 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 15 } } }, "init": { "type": "NewExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "db", "range": [ 259, 261 ], "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 24 } } }, "property": { "type": "Identifier", "name": "Dispersion", "range": [ 262, 272 ], "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 35 } } }, "range": [ 259, 272 ], "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 35 } } }, "property": { "type": "Identifier", "name": "Atmosphere", "range": [ 273, 283 ], "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 46 } } }, "range": [ 259, 283 ], "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 46 } } }, "arguments": [ { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 285, 286 ], "loc": { "start": { "line": 16, "column": 48 }, "end": { "line": 16, "column": 49 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 288, 289 ], "loc": { "start": { "line": 16, "column": 51 }, "end": { "line": 16, "column": 52 } } } ], "range": [ 284, 290 ], "loc": { "start": { "line": 16, "column": 47 }, "end": { "line": 16, "column": 53 } } }, { "type": "Literal", "value": 0.5, "raw": ".5", "range": [ 292, 294 ], "loc": { "start": { "line": 16, "column": 55 }, "end": { "line": 16, "column": 57 } } }, { "type": "Literal", "value": 65, "raw": "65", "range": [ 296, 298 ], "loc": { "start": { "line": 16, "column": 59 }, "end": { "line": 16, "column": 61 } } }, { "type": "Literal", "value": 288, "raw": "288", "range": [ 300, 303 ], "loc": { "start": { "line": 16, "column": 63 }, "end": { "line": 16, "column": 66 } } } ], "range": [ 255, 304 ], "loc": { "start": { "line": 16, "column": 18 }, "end": { "line": 16, "column": 67 } } }, "range": [ 249, 304 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 67 } } } ], "kind": "let", "range": [ 245, 305 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 68 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 318, 324 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 18 } } }, "init": { "type": "NewExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "db", "range": [ 331, 333 ], "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 27 } } }, "property": { "type": "Identifier", "name": "Dispersion", "range": [ 334, 344 ], "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 38 } } }, "range": [ 331, 344 ], "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 38 } } }, "property": { "type": "Identifier", "name": "Source", "range": [ 345, 351 ], "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 45 } } }, "range": [ 331, 351 ], "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 45 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "db", "range": [ 365, 367 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 14 } } }, "property": { "type": "Identifier", "name": "Dispersion", "range": [ 368, 378 ], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 25 } } }, "range": [ 365, 378 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 25 } } }, "property": { "type": "Identifier", "name": "SourceType", "range": [ 379, 389 ], "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 18, "column": 36 } } }, "range": [ 365, 389 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 36 } } }, "property": { "type": "Identifier", "name": "POINT", "range": [ 390, 395 ], "loc": { "start": { "line": 18, "column": 37 }, "end": { "line": 18, "column": 42 } } }, "range": [ 365, 395 ], "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 42 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 409, 415 ], "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 18 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 416, 433 ], "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 36 } } }, "range": [ 409, 433 ], "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 36 } } }, { "type": "Literal", "value": 20, "raw": "20", "range": [ 447, 449 ], "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 14 } } }, { "type": "Literal", "value": 5, "raw": "5", "range": [ 463, 464 ], "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 13 } } }, { "type": "Literal", "value": 350, "raw": "350", "range": [ 478, 481 ], "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 22, "column": 15 } } }, { "type": "Literal", "value": 5, "raw": "5", "range": [ 495, 496 ], "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 13 } } } ], "range": [ 327, 506 ], "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 24, "column": 9 } } }, "range": [ 318, 506 ], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 24, "column": 9 } } } ], "kind": "let", "range": [ 314, 507 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 24, "column": 10 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 517, 519 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 10 } } }, "arguments": [ { "type": "Literal", "value": "should use the default center", "raw": "'should use the default center'", "range": [ 520, 551 ], "loc": { "start": { "line": 26, "column": 11 }, "end": { "line": 26, "column": 42 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "puff", "range": [ 573, 577 ], "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 16 } } }, "right": { "type": "NewExpression", "callee": {