roc
Version:
Build modern web applications easily
1,522 lines (1,521 loc) • 253 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2894,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 69,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 7,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 36
}
},
"value": "source-map-support/register",
"rawValue": "source-map-support/register",
"raw": "'source-map-support/register'"
}
},
{
"type": "ImportDeclaration",
"start": 39,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 51
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 48,
"end": 61,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 48,
"end": 61,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 22
}
},
"name": "isPlainObject"
},
"local": {
"type": "Identifier",
"start": 48,
"end": 61,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 22
}
},
"name": "isPlainObject"
}
},
{
"type": "ImportSpecifier",
"start": 63,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 34
}
},
"imported": {
"type": "Identifier",
"start": 63,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 34
}
},
"name": "isFunction"
},
"local": {
"type": "Identifier",
"start": 63,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 34
}
},
"name": "isFunction"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 81,
"end": 89,
"loc": {
"start": {
"line": 3,
"column": 42
},
"end": {
"line": 3,
"column": 50
}
},
"value": "lodash",
"rawValue": "lodash",
"raw": "'lodash'"
}
},
{
"type": "ImportDeclaration",
"start": 92,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 38
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 101,
"end": 110,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 101,
"end": 110,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 18
}
},
"name": "toCliFlag"
},
"local": {
"type": "Identifier",
"start": 101,
"end": 110,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 18
}
},
"name": "toCliFlag"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 118,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 37
}
},
"value": "./helpers",
"rawValue": "./helpers",
"raw": "'./helpers'"
}
},
{
"type": "VariableDeclaration",
"start": 132,
"end": 207,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 75
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 138,
"end": 206,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 74
}
},
"id": {
"type": "Identifier",
"start": 138,
"end": 155,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 23
}
},
"name": "defaultValidation"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 158,
"end": 206,
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 7,
"column": 74
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 159,
"end": 164,
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 7,
"column": 32
}
},
"name": "input"
},
{
"type": "Identifier",
"start": 166,
"end": 170,
"loc": {
"start": {
"line": 7,
"column": 34
},
"end": {
"line": 7,
"column": 38
}
},
"name": "info"
}
],
"body": {
"type": "ConditionalExpression",
"start": 175,
"end": 206,
"loc": {
"start": {
"line": 7,
"column": 43
},
"end": {
"line": 7,
"column": 74
}
},
"test": {
"type": "Identifier",
"start": 175,
"end": 179,
"loc": {
"start": {
"line": 7,
"column": 43
},
"end": {
"line": 7,
"column": 47
}
},
"name": "info"
},
"consequent": {
"type": "ObjectExpression",
"start": 182,
"end": 199,
"loc": {
"start": {
"line": 7,
"column": 50
},
"end": {
"line": 7,
"column": 67
}
},
"properties": [
{
"type": "Property",
"start": 183,
"end": 198,
"loc": {
"start": {
"line": 7,
"column": 51
},
"end": {
"line": 7,
"column": 66
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 183,
"end": 187,
"loc": {
"start": {
"line": 7,
"column": 51
},
"end": {
"line": 7,
"column": 55
}
},
"name": "type"
},
"value": {
"type": "Literal",
"start": 189,
"end": 198,
"loc": {
"start": {
"line": 7,
"column": 57
},
"end": {
"line": 7,
"column": 66
}
},
"value": "Unknown",
"rawValue": "Unknown",
"raw": "'Unknown'"
},
"kind": "init"
}
]
},
"alternate": {
"type": "Literal",
"start": 202,
"end": 206,
"loc": {
"start": {
"line": 7,
"column": 70
},
"end": {
"line": 7,
"column": 74
}
},
"value": true,
"rawValue": true,
"raw": "true"
}
}
}
}
],
"kind": "const",
"trailingComments": [
{
"type": "Block",
"value": "*\n * Creates a {@link rocDocumentationObject}.\n *\n * @param {Object} initalObject - The object to create a {@link rocDocumentationObject} of.\n * @param {rocMetaSettings} meta - The meta object to use.\n * @param {string[]} [initalFilter=[]] - The groups that should be used, will default to all groups.\n *\n * @returns {rocDocumentationObject} - The completed documentation object.\n ",
"start": 209,
"end": 594,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 17,
"column": 3
}
},
"range": [
209,
594
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 595,
"end": 2893,
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 68,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 610,
"end": 2893,
"loc": {
"start": {
"line": 18,
"column": 15
},
"end": {
"line": 68,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 619,
"end": 643,
"loc": {
"start": {
"line": 18,
"column": 24
},
"end": {
"line": 18,
"column": 48
}
},
"name": "buildDocumentationObject",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 644,
"end": 656,
"loc": {
"start": {
"line": 18,
"column": 49
},
"end": {
"line": 18,
"column": 61
}
},
"name": "initalObject"
},
{
"type": "AssignmentPattern",
"start": 658,
"end": 667,
"loc": {
"start": {
"line": 18,
"column": 63
},
"end": {
"line": 18,
"column": 72
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 658,
"end": 662,
"loc": {
"start": {
"line": 18,
"column": 63
},
"end": {
"line": 18,
"column": 67
}
},
"name": "meta"
},
"right": {
"type": "ObjectExpression",
"start": 665,
"end": 667,
"loc": {
"start": {
"line": 18,
"column": 70
},
"end": {
"line": 18,
"column": 72
}
},
"properties": []
}
},
{
"type": "AssignmentPattern",
"start": 669,
"end": 686,
"loc": {
"start": {
"line": 18,
"column": 74
},
"end": {
"line": 18,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 669,
"end": 681,
"loc": {
"start": {
"line": 18,
"column": 74
},
"end": {
"line": 18,
"column": 86
}
},
"name": "initalFilter"
},
"right": {
"type": "ArrayExpression",
"start": 684,
"end": 686,
"loc": {
"start": {
"line": 18,
"column": 89
},
"end": {
"line": 18,
"column": 91
}
},
"elements": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 688,
"end": 2893,
"loc": {
"start": {
"line": 18,
"column": 93
},
"end": {
"line": 68,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 694,
"end": 832,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 21,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 700,
"end": 831,
"loc": {
"start": {
"line": 19,
"column": 10
},
"end": {
"line": 21,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 700,
"end": 710,
"loc": {
"start": {
"line": 19,
"column": 10
},
"end": {
"line": 19,
"column": 20
}
},
"name": "allObjects"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 713,
"end": 831,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 21,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 714,
"end": 720,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 30
}
},
"name": "object"
},
{
"type": "Identifier",
"start": 722,
"end": 730,
"loc": {
"start": {
"line": 19,
"column": 32
},
"end": {
"line": 19,
"column": 40
}
},
"name": "callback"
}
],
"body": {
"type": "BlockStatement",
"start": 735,
"end": 831,
"loc": {
"start": {
"line": 19,
"column": 45
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 745,
"end": 825,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 88
}
},
"argument": {
"type": "CallExpression",
"start": 752,
"end": 824,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 87
}
},
"callee": {
"type": "MemberExpression",
"start": 752,
"end": 792,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 55
}
},
"object": {
"type": "CallExpression",
"start": 752,
"end": 785,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 48
}
},
"callee": {
"type": "MemberExpression",
"start": 752,
"end": 775,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 38
}
},
"object": {
"type": "CallExpression",
"start": 752,
"end": 771,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 34
}
},
"callee": {
"type": "MemberExpression",
"start": 752,
"end": 763,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 752,
"end": 758,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 21
}
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 759,
"end": 763,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 26
}
},
"name": "keys"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 764,
"end": 770,
"loc": {
"start": {
"line": 20,
"column": 27
},
"end": {
"line": 20,
"column": 33
}
},
"name": "object"
}
]
},
"property": {
"type": "Identifier",
"start": 772,
"end": 775,
"loc": {
"start": {
"line": 20,
"column": 35
},
"end": {
"line": 20,
"column": 38
}
},
"name": "map"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 776,
"end": 784,
"loc": {
"start": {
"line": 20,
"column": 39
},
"end": {
"line": 20,
"column": 47
}
},
"name": "callback"
}
]
},
"property": {
"type": "Identifier",
"start": 786,
"end": 792,
"loc": {
"start": {
"line": 20,
"column": 49
},
"end": {
"line": 20,
"column": 55
}
},
"name": "filter"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 793,
"end": 823,
"loc": {
"start": {
"line": 20,
"column": 56
},
"end": {
"line": 20,
"column": 86
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 794,
"end": 799,
"loc": {
"start": {
"line": 20,
"column": 57
},
"end": {
"line": 20,
"column": 62
}
},
"name": "value"
}
],
"body": {
"type": "BinaryExpression",
"start": 804,
"end": 823,
"loc": {
"start": {
"line": 20,
"column": 67
},
"end": {
"line": 20,
"column": 86
}
},
"left": {
"type": "Identifier",
"start": 804,
"end": 809,
"loc": {
"start": {
"line": 20,
"column": 67
},
"end": {
"line": 20,
"column": 72
}
},
"name": "value"
},
"operator": "!==",
"right": {
"type": "Identifier",
"start": 814,
"end": 823,
"loc": {
"start": {
"line": 20,
"column": 77
},
"end": {
"line": 20,
"column": 86
}
},
"name": "undefined"
}
}
}
]
}
}
]
}
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 838,
"end": 1340,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 32,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 844,
"end": 1339,
"loc": {
"start": {
"line": 23,
"column": 10
},
"end": {
"line": 32,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 844,
"end": 855,
"loc": {
"start": {
"line": 23,
"column": 10
},
"end": {
"line": 23,
"column": 21
}
},
"name": "manageGroup"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 858,
"end": 1339,
"loc": {
"start": {
"line": 23,
"column": 24
},
"end": {
"line": 32,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 859,
"end": 865,
"loc": {
"start": {
"line": 23,
"column": 25
},
"end": {
"line": 23,
"column": 31
}
},
"name": "object"
},
{
"type": "Identifier",
"start": 867,
"end": 871,
"loc": {
"start": {
"line": 23,
"column": 33
},
"end": {
"line": 23,
"column": 37
}
},
"name": "name"
},
{
"type": "AssignmentPattern",
"start": 873,
"end": 883,
"loc": {
"start": {
"line": 23,
"column": 39
},
"end": {
"line": 23,
"column": 49
}
},
"left": {
"type": "Identifier",
"start": 873,
"end": 878,
"loc": {
"start": {
"line": 23,
"column": 39
},
"end": {
"line": 23,
"column": 44
}
},
"name": "group"
},
"right": {
"type": "ObjectExpression",
"start": 881,
"end": 883,
"loc": {
"start": {
"line": 23,
"column": 47
},
"end": {
"line": 23,
"column": 49
}
},
"properties": []
}
},
{
"type": "AssignmentPattern",
"start": 885,
"end": 901,
"loc": {
"start": {
"line": 23,
"column": 51
},
"end": {
"line": 23,
"column": 67
}
},
"left": {
"type": "Identifier",
"start": 885,
"end": 896,
"loc": {
"start": {
"line": 23,
"column": 51
},
"end": {
"line": 23,
"column": 62
}
},
"name": "description"
},
"right": {
"type": "ObjectExpression",
"start": 899,
"end": 901,
"loc": {
"start": {
"line": 23,
"column": 65
},
"end": {
"line": 23,
"column": 67
}
},
"properties": []
}
},
{
"type": "AssignmentPattern",
"start": 903,
"end": 918,
"loc": {
"start": {
"line": 23,
"column": 69
},
"end": {
"line": 23,
"column": 84
}
},
"left": {
"type": "Identifier",
"start": 903,
"end": 913,
"loc": {
"start": {
"line": 23,
"column": 69
},
"end": {
"line": 23,
"column": 79
}
},
"name": "validation"
},
"right": {
"type": "ObjectExpression",
"start": 916,
"end": 918,
"loc": {
"start": {
"line": 23,
"column": 82
},
"end": {
"line": 23,
"column": 84
}
},
"properties": []
}
},
{
"type": "Identifier",
"start": 920,
"end": 927,
"loc": {
"start": {
"line": 23,
"column": 86
},
"end": {
"line": 23,
"column": 93
}
},
"name": "parents"
},
{
"type": "Identifier",
"start": 929,
"end": 934,
"loc": {
"start": {
"line": 23,
"column": 95
},
"end": {
"line": 23,
"column": 100
}
},
"name": "level"
}
],
"body": {
"type": "BlockStatement",
"start": 939,
"end": 1339,
"loc": {
"start": {
"line": 23,
"column": 105
},
"end": {
"line": 32,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 949,
"end": 1015,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 74
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 955,
"end": 1014,
"loc": {
"start": {
"line": 24,
"column": 14
},
"end": {
"line": 24,
"column": 73
}
},
"id": {
"type": "Identifier",
"start": 955,
"end": 971,
"loc": {
"start": {
"line": 24,
"column": 14
},
"end": {
"line": 24,
"column": 30
}
},
"name": "groupDescription"
},
"init": {
"type": "ConditionalExpression",
"start": 974,
"end": 1014,
"loc": {
"start": {
"line": 24,
"column": 33
},
"end": {
"line": 24,
"column": 73
}
},
"test": {
"type": "CallExpression",
"start": 974,
"end": 994,
"loc": {
"start": {
"line": 24,
"column": 33
},
"end": {
"line": 24,
"column": 53
}
},
"callee": {
"type": "Identifier",
"start": 974,
"end": 987,
"loc": {
"start": {
"line": 24,
"column": 33
},
"end": {
"line": 24,
"column": 46
}
},
"name": "isPlainObject"
},
"arguments": [
{
"type": "Identifier",
"start": 988,
"end": 993,
"loc": {
"start": {
"line": 24,
"column": 47
},
"end": {
"line": 24,
"column": 52
}
},
"name": "group"
}
]
},
"consequent": {
"type": "Identifier",
"start": 997,
"end": 1006,
"loc": {
"start": {
"line": 24,
"column": 56
},
"end": {
"line": 24,
"column": 65
}
},
"name": "undefined"
},
"alternate": {
"type": "Identifier",
"start": 1009,
"end": 1014,
"loc": {
"start": {
"line": 24,
"column": 68
},
"end": {
"line": 24,
"column": 73
}
},
"name": "group"