1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-03 14:32:21 +02:00
TableFilter/docs/ast/source/number.js.json
koalyptus 4481fbe361 publish Docs to gh-pages (auto)
branch:       master
SHA:          c7d6de72f7
range SHA:    81f31a3106fb...c7d6de72f785
build id:     375208741
build number: 1103
2018-05-05 08:21:30 +00:00

4230 lines
112 KiB
JSON

{
"type": "File",
"start": 0,
"end": 1034,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 33,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1034,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 33,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 16
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "isNumber"
},
"name": "isNumber"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "isNumber"
},
"name": "isNumber"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 32
}
},
"extra": {
"rawValue": "./types",
"raw": "'./types'"
},
"value": "./types"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * Takes a string, removes all formatting/cruft and returns the raw float value\n * @param {String} Formatted number\n * @param {String} Decimal type '.' or ','\n * @return {Number} Unformatted number\n *\n * https://github.com/openexchangerates/accounting.js/blob/master/accounting.js\n ",
"start": 35,
"end": 323,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 324,
"end": 1033,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 32,
"column": 2
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "VariableDeclaration",
"start": 331,
"end": 1033,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 32,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 337,
"end": 1032,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 32,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 337,
"end": 342,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
},
"identifierName": "parse"
},
"name": "parse",
"leadingComments": null
},
"init": {
"type": "ArrowFunctionExpression",
"start": 345,
"end": 1032,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 32,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 337,
"end": 342,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
},
"identifierName": "parse"
},
"name": "parse",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 346,
"end": 351,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 27
},
"identifierName": "value"
},
"name": "value"
},
{
"type": "AssignmentPattern",
"start": 353,
"end": 366,
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 42
}
},
"left": {
"type": "Identifier",
"start": 353,
"end": 360,
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 36
},
"identifierName": "decimal"
},
"name": "decimal"
},
"right": {
"type": "StringLiteral",
"start": 363,
"end": 366,
"loc": {
"start": {
"line": 11,
"column": 39
},
"end": {
"line": 11,
"column": 42
}
},
"extra": {
"rawValue": ".",
"raw": "'.'"
},
"value": "."
}
}
],
"body": {
"type": "BlockStatement",
"start": 371,
"end": 1032,
"loc": {
"start": {
"line": 11,
"column": 47
},
"end": {
"line": 32,
"column": 1
}
},
"body": [
{
"type": "IfStatement",
"start": 432,
"end": 482,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
},
"test": {
"type": "CallExpression",
"start": 436,
"end": 451,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 23
}
},
"callee": {
"type": "Identifier",
"start": 436,
"end": 444,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
},
"identifierName": "isNumber"
},
"name": "isNumber",
"leadingComments": null
},
"arguments": [
{
"type": "Identifier",
"start": 445,
"end": 450,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 22
},
"identifierName": "value"
},
"name": "value"
}
],
"leadingComments": null
},
"consequent": {
"type": "BlockStatement",
"start": 453,
"end": 482,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 15,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 463,
"end": 476,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 21
}
},
"argument": {
"type": "Identifier",
"start": 470,
"end": 475,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 20
},
"identifierName": "value"
},
"name": "value"
}
}
],
"directives": [],
"trailingComments": null
},
"alternate": null,
"leadingComments": [
{
"type": "CommentLine",
"value": " Return the value as-is if it's already a number",
"start": 377,
"end": 427,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 54
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " Build regex to strip out everything except digits, decimal point and",
"start": 488,
"end": 559,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 75
}
}
},
{
"type": "CommentLine",
"value": " minus sign",
"start": 564,
"end": 577,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 17
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 582,
"end": 638,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 60
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 586,
"end": 637,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 59
}
},
"id": {
"type": "Identifier",
"start": 586,
"end": 591,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 13
},
"identifierName": "regex"
},
"name": "regex",
"leadingComments": null
},
"init": {
"type": "NewExpression",
"start": 594,
"end": 637,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 59
}
},
"callee": {
"type": "Identifier",
"start": 598,
"end": 604,
"loc": {
"start": {
"line": 19,
"column": 20
},
"end": {
"line": 19,
"column": 26
},
"identifierName": "RegExp"
},
"name": "RegExp"
},
"arguments": [
{
"type": "BinaryExpression",
"start": 605,
"end": 629,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 51
}
},
"left": {
"type": "BinaryExpression",
"start": 605,
"end": 623,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 45
}
},
"left": {
"type": "StringLiteral",
"start": 605,
"end": 613,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 35
}
},
"extra": {
"rawValue": "[^0-9-",
"raw": "'[^0-9-'"
},
"value": "[^0-9-"
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 616,
"end": 623,
"loc": {
"start": {
"line": 19,
"column": 38
},
"end": {
"line": 19,
"column": 45
},
"identifierName": "decimal"
},
"name": "decimal"
}
},
"operator": "+",
"right": {
"type": "StringLiteral",
"start": 626,
"end": 629,
"loc": {
"start": {
"line": 19,
"column": 48
},
"end": {
"line": 19,
"column": 51
}
},
"extra": {
"rawValue": "]",
"raw": "']'"
},
"value": "]"
}
},
{
"type": "ArrayExpression",
"start": 631,
"end": 636,
"loc": {
"start": {
"line": 19,
"column": 53
},
"end": {
"line": 19,
"column": 58
}
},
"elements": [
{
"type": "StringLiteral",
"start": 632,
"end": 635,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 57
}
},
"extra": {
"rawValue": "g",
"raw": "'g'"
},
"value": "g"
}
]
}
]
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " Build regex to strip out everything except digits, decimal point and",
"start": 488,
"end": 559,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 75
}
}
},
{
"type": "CommentLine",
"value": " minus sign",
"start": 564,
"end": 577,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 17
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 643,
"end": 948,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 28,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 647,
"end": 947,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 28,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 647,
"end": 658,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 19
},
"identifierName": "unformatted"
},
"name": "unformatted"
},
"init": {
"type": "CallExpression",
"start": 661,
"end": 947,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 28,
"column": 5
}
},
"callee": {
"type": "Identifier",
"start": 661,
"end": 671,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 32
},
"identifierName": "parseFloat"
},
"name": "parseFloat"
},
"arguments": [
{
"type": "CallExpression",
"start": 681,
"end": 941,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 27,
"column": 34
}
},
"callee": {
"type": "MemberExpression",
"start": 681,
"end": 927,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 27,
"column": 20
}
},
"object": {
"type": "CallExpression",
"start": 681,
"end": 855,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 25,
"column": 31
}
},
"callee": {
"type": "MemberExpression",
"start": 681,
"end": 844,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 25,
"column": 20
}
},
"object": {
"type": "CallExpression",
"start": 681,
"end": 788,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 23,
"column": 39
}
},
"callee": {
"type": "MemberExpression",
"start": 681,
"end": 769,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 23,
"column": 20
}
},
"object": {
"type": "BinaryExpression",
"start": 682,
"end": 692,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 19
}
},
"left": {
"type": "StringLiteral",
"start": 682,
"end": 684,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 11
}
},
"extra": {
"rawValue": "",
"raw": "''"
},
"value": ""
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 687,
"end": 692,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 19
},
"identifierName": "value"
},
"name": "value"
},
"extra": {
"parenthesized": true,
"parenStart": 681
}
},
"property": {
"type": "Identifier",
"start": 762,
"end": 769,
"loc": {
"start": {
"line": 23,
"column": 13
},
"end": {
"line": 23,
"column": 20
},
"identifierName": "replace"
},
"name": "replace",
"leadingComments": [
{
"type": "CommentLine",
"value": " replace bracketed values with negatives",
"start": 706,
"end": 748,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 54
}
}
}
]
},
"computed": false
},
"arguments": [
{
"type": "RegExpLiteral",
"start": 770,
"end": 780,
"loc": {
"start": {
"line": 23,
"column": 21
},
"end": {
"line": 23,
"column": 31
}
},
"extra": {
"raw": "/\\((.*)\\)/"
},
"pattern": "\\((.*)\\)",
"flags": ""
},
{
"type": "StringLiteral",
"start": 782,
"end": 787,
"loc": {
"start": {
"line": 23,
"column": 33
},
"end": {
"line": 23,
"column": 38
}
},
"extra": {
"rawValue": "-$1",
"raw": "'-$1'"
},
"value": "-$1"
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " strip out any cruft",
"start": 801,
"end": 823,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 34
}
}
}
]
},
"property": {
"type": "Identifier",
"start": 837,
"end": 844,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 20
},
"identifierName": "replace"
},
"name": "replace",
"leadingComments": [
{
"type": "CommentLine",
"value": " strip out any cruft",
"start": 801,
"end": 823,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 34
}
}
}
]
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 845,
"end": 850,
"loc": {
"start": {
"line": 25,
"column": 21
},
"end": {
"line": 25,
"column": 26
},
"identifierName": "regex"
},
"name": "regex"
},
{
"type": "StringLiteral",
"start": 852,
"end": 854,
"loc": {
"start": {
"line": 25,
"column": 28
},
"end": {
"line": 25,
"column": 30
}
},
"extra": {
"rawValue": "",
"raw": "''"
},
"value": ""
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " make sure decimal point is standard",
"start": 868,
"end": 906,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 26,
"column": 50
}
}
}
]
},
"property": {
"type": "Identifier",
"start": 920,
"end": 927,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 20
},
"identifierName": "replace"
},
"name": "replace",
"leadingComments": [
{
"type": "CommentLine",
"value": " make sure decimal point is standard",
"start": 868,
"end": 906,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 26,
"column": 50
}
}
}
]
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 928,
"end": 935,
"loc": {
"start": {
"line": 27,
"column": 21
},
"end": {
"line": 27,
"column": 28
},
"identifierName": "decimal"
},
"name": "decimal"
},
{
"type": "StringLiteral",
"start": 937,
"end": 940,
"loc": {
"start": {
"line": 27,
"column": 30
},
"end": {
"line": 27,
"column": 33
}
},
"extra": {
"rawValue": ".",
"raw": "'.'"
},
"value": "."
}
]
}
]
}
}
],
"kind": "let",
"trailingComments": [
{
"type": "CommentLine",
"value": " This will fail silently",
"start": 954,
"end": 980,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 30
}
}
}
]
},
{
"type": "ReturnStatement",
"start": 985,
"end": 1030,
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 49
}
},
"argument": {
"type": "ConditionalExpression",
"start": 992,
"end": 1029,
"loc": {
"start": {
"line": 31,
"column": 11
},
"end": {
"line": 31,
"column": 48
}
},
"test": {
"type": "UnaryExpression",
"start": 992,
"end": 1011,
"loc": {
"start": {
"line": 31,
"column": 11
},
"end": {
"line": 31,
"column": 30
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"start": 993,
"end": 1011,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 993,
"end": 998,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 17
},
"identifierName": "isNaN"
},
"name": "isNaN",
"leadingComments": null
},
"arguments": [
{
"type": "Identifier",
"start": 999,
"end": 1010,
"loc": {
"start": {
"line": 31,
"column": 18
},
"end": {
"line": 31,
"column": 29
},
"identifierName": "unformatted"
},
"name": "unformatted"
}
],
"leadingComments": null
},
"extra": {
"parenthesizedArgument": false
},
"leadingComments": null
},
"consequent": {
"type": "Identifier",
"start": 1014,
"end": 1025,
"loc": {
"start": {
"line": 31,
"column": 33
},
"end": {
"line": 31,
"column": 44
},
"identifierName": "unformatted"
},
"name": "unformatted"
},
"alternate": {
"type": "NumericLiteral",
"start": 1028,
"end": 1029,
"loc": {
"start": {
"line": 31,
"column": 47
},
"end": {
"line": 31,
"column": 48
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " This will fail silently",
"start": 954,
"end": 980,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 30
}
}
}
]
}
],
"directives": []
}
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * Takes a string, removes all formatting/cruft and returns the raw float value\n * @param {String} Formatted number\n * @param {String} Decimal type '.' or ','\n * @return {Number} Unformatted number\n *\n * https://github.com/openexchangerates/accounting.js/blob/master/accounting.js\n ",
"start": 35,
"end": 323,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * Takes a string, removes all formatting/cruft and returns the raw float value\n * @param {String} Formatted number\n * @param {String} Decimal type '.' or ','\n * @return {Number} Unformatted number\n *\n * https://github.com/openexchangerates/accounting.js/blob/master/accounting.js\n ",
"start": 35,
"end": 323,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * Takes a string, removes all formatting/cruft and returns the raw float value\n * @param {String} Formatted number\n * @param {String} Decimal type '.' or ','\n * @return {Number} Unformatted number\n *\n * https://github.com/openexchangerates/accounting.js/blob/master/accounting.js\n ",
"start": 35,
"end": 323,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
}
},
{
"type": "CommentLine",
"value": " Return the value as-is if it's already a number",
"start": 377,
"end": 427,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 54
}
}
},
{
"type": "CommentLine",
"value": " Build regex to strip out everything except digits, decimal point and",
"start": 488,
"end": 559,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 75
}
}
},
{
"type": "CommentLine",
"value": " minus sign",
"start": 564,
"end": 577,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 17
}
}
},
{
"type": "CommentLine",
"value": " replace bracketed values with negatives",
"start": 706,
"end": 748,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 54
}
}
},
{
"type": "CommentLine",
"value": " strip out any cruft",
"start": 801,
"end": 823,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 34
}
}
},
{
"type": "CommentLine",
"value": " make sure decimal point is standard",
"start": 868,
"end": 906,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 26,
"column": 50
}
}
},
{
"type": "CommentLine",
"value": " This will fail silently",
"start": 954,
"end": 980,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 30
}
}
}
],
"tokens": [
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "isNumber",
"start": 8,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 16
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./types",
"start": 23,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 32
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 32,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 33
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Takes a string, removes all formatting/cruft and returns the raw float value\n * @param {String} Formatted number\n * @param {String} Decimal type '.' or ','\n * @return {Number} Unformatted number\n *\n * https://github.com/openexchangerates/accounting.js/blob/master/accounting.js\n ",
"start": 35,
"end": 323,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
}
},
{
"type": {
"label": "export",
"keyword": "export",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "export",
"start": 324,
"end": 330,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 6
}
}
},
{
"type": {
"label": "const",
"keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "const",
"start": 331,
"end": 336,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "parse",
"start": 337,
"end": 342,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 343,
"end": 344,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 20
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 345,
"end": 346,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "value",
"start": 346,
"end": 351,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 27
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 351,
"end": 352,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 28
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "decimal",
"start": 353,
"end": 360,
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 36
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 361,
"end": 362,
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 11,
"column": 38
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": ".",
"start": 363,
"end": 366,
"loc": {
"start": {
"line": 11,
"column": 39
},
"end": {
"line": 11,
"column": 42
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 366,
"end": 367,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 43
}
}
},
{
"type": {
"label": "=>",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 368,
"end": 370,
"loc": {
"start": {
"line": 11,
"column": 44
},
"end": {
"line": 11,
"column": 46
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 371,
"end": 372,
"loc": {
"start": {
"line": 11,
"column": 47
},
"end": {
"line": 11,
"column": 48
}
}
},
{
"type": "CommentLine",
"value": " Return the value as-is if it's already a number",
"start": 377,
"end": 427,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 54
}
}
},
{
"type": {
"label": "if",
"keyword": "if",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "if",
"start": 432,
"end": 434,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 435,
"end": 436,
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "isNumber",
"start": 436,
"end": 444,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 444,
"end": 445,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "value",
"start": 445,
"end": 450,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 22
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 450,
"end": 451,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 23
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 451,
"end": 452,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 24
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 453,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 26
}
}
},
{
"type": {
"label": "return",
"keyword": "return",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "return",
"start": 463,
"end": 469,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 14
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "value",
"start": 470,
"end": 475,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 20
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 475,
"end": 476,
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 21
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 481,
"end": 482,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
}
},
{
"type": "CommentLine",
"value": " Build regex to strip out everything except digits, decimal point and",
"start": 488,
"end": 559,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 75
}
}
},
{
"type": "CommentLine",
"value": " minus sign",
"start": 564,
"end": 577,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 17
}
}
},
{
"type": {
"label": "let",
"keyword": "let",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "let",
"start": 582,
"end": 585,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "regex",
"start": 586,
"end": 591,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 13
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 592,
"end": 593,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 15
}
}
},
{
"type": {
"label": "new",
"keyword": "new",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "new",
"start": 594,
"end": 597,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 19
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "RegExp",
"start": 598,
"end": 604,
"loc": {
"start": {
"line": 19,
"column": 20
},
"end": {
"line": 19,
"column": 26
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 604,
"end": 605,
"loc": {
"start": {
"line": 19,
"column": 26
},
"end": {
"line": 19,
"column": 27
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "[^0-9-",
"start": 605,
"end": 613,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 35
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 614,
"end": 615,
"loc": {
"start": {
"line": 19,
"column": 36
},
"end": {
"line": 19,
"column": 37
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "decimal",
"start": 616,
"end": 623,
"loc": {
"start": {
"line": 19,
"column": 38
},
"end": {
"line": 19,
"column": 45
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 624,
"end": 625,
"loc": {
"start": {
"line": 19,
"column": 46
},
"end": {
"line": 19,
"column": 47
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "]",
"start": 626,
"end": 629,
"loc": {
"start": {
"line": 19,
"column": 48
},
"end": {
"line": 19,
"column": 51
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 629,
"end": 630,
"loc": {
"start": {
"line": 19,
"column": 51
},
"end": {
"line": 19,
"column": 52
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 631,
"end": 632,
"loc": {
"start": {
"line": 19,
"column": 53
},
"end": {
"line": 19,
"column": 54
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "g",
"start": 632,
"end": 635,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 57
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 635,
"end": 636,
"loc": {
"start": {
"line": 19,
"column": 57
},
"end": {
"line": 19,
"column": 58
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 636,
"end": 637,
"loc": {
"start": {
"line": 19,
"column": 58
},
"end": {
"line": 19,
"column": 59
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 637,
"end": 638,
"loc": {
"start": {
"line": 19,
"column": 59
},
"end": {
"line": 19,
"column": 60
}
}
},
{
"type": {
"label": "let",
"keyword": "let",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "let",
"start": 643,
"end": 646,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "unformatted",
"start": 647,
"end": 658,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 19
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 659,
"end": 660,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "parseFloat",
"start": 661,
"end": 671,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 32
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 671,
"end": 672,
"loc": {
"start": {
"line": 20,
"column": 32
},
"end": {
"line": 20,
"column": 33
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 681,
"end": 682,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 9
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "",
"start": 682,
"end": 684,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 11
}
}
},
{
"type": {
"label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": 9,
"updateContext": null
},
"value": "+",
"start": 685,
"end": 686,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "value",
"start": 687,
"end": 692,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 19
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 692,
"end": 693,
"loc": {
"start": {
"line": 21,
"column": 19
},
"end": {
"line": 21,
"column": 20
}
}
},
{
"type": "CommentLine",
"value": " replace bracketed values with negatives",
"start": 706,
"end": 748,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 54
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 761,
"end": 762,
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "replace",
"start": 762,
"end": 769,
"loc": {
"start": {
"line": 23,
"column": 13
},
"end": {
"line": 23,
"column": 20
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 769,
"end": 770,
"loc": {
"start": {
"line": 23,
"column": 20
},
"end": {
"line": 23,
"column": 21
}
}
},
{
"type": {
"label": "regexp",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": {
"pattern": "\\((.*)\\)",
"flags": ""
},
"start": 770,
"end": 780,
"loc": {
"start": {
"line": 23,
"column": 21
},
"end": {
"line": 23,
"column": 31
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 780,
"end": 781,
"loc": {
"start": {
"line": 23,
"column": 31
},
"end": {
"line": 23,
"column": 32
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "-$1",
"start": 782,
"end": 787,
"loc": {
"start": {
"line": 23,
"column": 33
},
"end": {
"line": 23,
"column": 38
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 787,
"end": 788,
"loc": {
"start": {
"line": 23,
"column": 38
},
"end": {
"line": 23,
"column": 39
}
}
},
{
"type": "CommentLine",
"value": " strip out any cruft",
"start": 801,
"end": 823,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 34
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 836,
"end": 837,
"loc": {
"start": {
"line": 25,
"column": 12
},
"end": {
"line": 25,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "replace",
"start": 837,
"end": 844,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 20
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 844,
"end": 845,
"loc": {
"start": {
"line": 25,
"column": 20
},
"end": {
"line": 25,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "regex",
"start": 845,
"end": 850,
"loc": {
"start": {
"line": 25,
"column": 21
},
"end": {
"line": 25,
"column": 26
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 850,
"end": 851,
"loc": {
"start": {
"line": 25,
"column": 26
},
"end": {
"line": 25,
"column": 27
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "",
"start": 852,
"end": 854,
"loc": {
"start": {
"line": 25,
"column": 28
},
"end": {
"line": 25,
"column": 30
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 854,
"end": 855,
"loc": {
"start": {
"line": 25,
"column": 30
},
"end": {
"line": 25,
"column": 31
}
}
},
{
"type": "CommentLine",
"value": " make sure decimal point is standard",
"start": 868,
"end": 906,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 26,
"column": 50
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 919,
"end": 920,
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 27,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "replace",
"start": 920,
"end": 927,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 20
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 927,
"end": 928,
"loc": {
"start": {
"line": 27,
"column": 20
},
"end": {
"line": 27,
"column": 21
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "decimal",
"start": 928,
"end": 935,
"loc": {
"start": {
"line": 27,
"column": 21
},
"end": {
"line": 27,
"column": 28
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 935,
"end": 936,
"loc": {
"start": {
"line": 27,
"column": 28
},
"end": {
"line": 27,
"column": 29
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": ".",
"start": 937,
"end": 940,
"loc": {
"start": {
"line": 27,
"column": 30
},
"end": {
"line": 27,
"column": 33
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 940,
"end": 941,
"loc": {
"start": {
"line": 27,
"column": 33
},
"end": {
"line": 27,
"column": 34
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 946,
"end": 947,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 5
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 947,
"end": 948,
"loc": {
"start": {
"line": 28,
"column": 5
},
"end": {
"line": 28,
"column": 6
}
}
},
{
"type": "CommentLine",
"value": " This will fail silently",
"start": 954,
"end": 980,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 30
}
}
},
{
"type": {
"label": "return",
"keyword": "return",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "return",
"start": 985,
"end": 991,
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 10
}
}
},
{
"type": {
"label": "prefix",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "!",
"start": 992,
"end": 993,
"loc": {
"start": {
"line": 31,
"column": 11
},
"end": {
"line": 31,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "isNaN",
"start": 993,
"end": 998,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 17
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 998,
"end": 999,
"loc": {
"start": {
"line": 31,
"column": 17
},
"end": {
"line": 31,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "unformatted",
"start": 999,
"end": 1010,
"loc": {
"start": {
"line": 31,
"column": 18
},
"end": {
"line": 31,
"column": 29
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1010,
"end": 1011,
"loc": {
"start": {
"line": 31,
"column": 29
},
"end": {
"line": 31,
"column": 30
}
}
},
{
"type": {
"label": "?",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1012,
"end": 1013,
"loc": {
"start": {
"line": 31,
"column": 31
},
"end": {
"line": 31,
"column": 32
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "unformatted",
"start": 1014,
"end": 1025,
"loc": {
"start": {
"line": 31,
"column": 33
},
"end": {
"line": 31,
"column": 44
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1026,
"end": 1027,
"loc": {
"start": {
"line": 31,
"column": 45
},
"end": {
"line": 31,
"column": 46
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 1028,
"end": 1029,
"loc": {
"start": {
"line": 31,
"column": 47
},
"end": {
"line": 31,
"column": 48
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1029,
"end": 1030,
"loc": {
"start": {
"line": 31,
"column": 48
},
"end": {
"line": 31,
"column": 49
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 1031,
"end": 1032,
"loc": {
"start": {
"line": 32,
"column": 0
},
"end": {
"line": 32,
"column": 1
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1032,
"end": 1033,
"loc": {
"start": {
"line": 32,
"column": 1
},
"end": {
"line": 32,
"column": 2
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 1034,
"end": 1034,
"loc": {
"start": {
"line": 33,
"column": 0
},
"end": {
"line": 33,
"column": 0
}
}
}
]
}