Skip to content

Commit 3a8b30e

Browse files
committed
Add library json files to docs folder
1 parent 3998a31 commit 3a8b30e

File tree

7 files changed

+181
-3
lines changed

7 files changed

+181
-3
lines changed

docs/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25481,7 +25481,7 @@ var receiveLibrary = function receiveLibrary(items) {
2548125481
var fetchLibrary = function fetchLibrary(id) {
2548225482
return function (dispatch) {
2548325483
dispatch(requestLibrary());
25484-
return (0, _isomorphicFetch2.default)('/library/js/' + id).then(function (response) {
25484+
return (0, _isomorphicFetch2.default)('/library/js/' + id + '.json').then(function (response) {
2548525485
return response.json();
2548625486
}).then(function (items) {
2548725487
return dispatch(receiveLibrary(items));

docs/library/js/1.json

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"modules":
3+
[
4+
{
5+
"label": "Arithmetic",
6+
"name": "arithmetic",
7+
"functions":
8+
[
9+
{ "id" : 41, "label": "+", "name" : "+", "arity" : 2, "title" : "+(term1: number, term2: number) : number" },
10+
{ "id" : 42, "label": "-", "name" : "-", "arity" : 2 },
11+
{ "id" : 43, "label": "*", "name" : "*", "arity" : 2 },
12+
{ "id" : 44, "label": "/", "name" : "/", "arity" : 2 }
13+
]
14+
},
15+
{
16+
"label": "Boolean Logic",
17+
"name": "boolean",
18+
"functions":
19+
[
20+
{ "id" : 31, "label": "&&", "name" : "&&", "arity" : 2 },
21+
{ "id" : 32, "label": "||", "name" : "||", "arity" : 2 },
22+
{ "id" : 33, "label": "!", "name" : "!", "arity" : 1 }
23+
]
24+
},
25+
{
26+
"label": "Collection",
27+
"name": "hof",
28+
"functions":
29+
[
30+
{ "id" : 5, "label": "join", "name" : "join", "arity" : 1 },
31+
{ "id" : 4, "label": "sort", "name" : "sort", "arity" : 1 }
32+
]
33+
},
34+
{
35+
"label": "Comparison",
36+
"name": "eq",
37+
"functions":
38+
[
39+
{ "id": 11, "label": "==", "name": "==", "arity" : 2 }
40+
]
41+
},
42+
{
43+
"label": "String",
44+
"name": "string",
45+
"functions":
46+
[
47+
{ "id" : 21, "label": "concat", "name" : "concat", "arity" : 2 },
48+
{ "id" : 22, "label": "length", "name" : "length", "arity" : 1 },
49+
{ "id" : 23, "label": "reverse", "name" : "reverse", "arity" : 1 },
50+
{ "id" : 24, "label": "split", "name" : "split", "arity" : 1 }
51+
]
52+
}
53+
],
54+
"primitives":
55+
{
56+
"boolean":
57+
{
58+
"id": 101,
59+
"label": "Boolean",
60+
"type": "boolean",
61+
"values": [
62+
{ "label": "false", "name": "false" },
63+
{ "label": "true", "name": "true" }
64+
]
65+
},
66+
"number":
67+
{
68+
"id": 102,
69+
"label": "Number",
70+
"type": "number"
71+
},
72+
"string":
73+
{
74+
"id": 103,
75+
"label": "String",
76+
"type": "string"
77+
}
78+
}
79+
}

docs/library/js/2.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"modules":
3+
[
4+
{
5+
"label": "Arithmetic",
6+
"name": "arithmetic",
7+
"functions":
8+
[
9+
{ "id" : 41, "label": "+", "name" : "+", "arity" : 2 },
10+
{ "id" : 42, "label": "-", "name" : "-", "arity" : 2 },
11+
{ "id" : 43, "label": "*", "name" : "*", "arity" : 2 },
12+
{ "id" : 44, "label": "/", "name" : "/", "arity" : 2 }
13+
]
14+
}
15+
],
16+
"primitives":
17+
{
18+
"number":
19+
{
20+
"id": 102,
21+
"label": "Number",
22+
"type": "number"
23+
}
24+
}
25+
}

docs/library/js/3.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"modules":
3+
[
4+
{
5+
"label": "String",
6+
"name": "string",
7+
"functions":
8+
[
9+
{ "id" : 21, "label": "concat", "name" : "concat", "arity" : 2 },
10+
{ "id" : 22, "label": "length", "name" : "length", "arity" : 1 },
11+
{ "id" : 23, "label": "reverse", "name" : "reverse", "arity" : 1 }
12+
]
13+
}
14+
],
15+
"primitives":
16+
{
17+
"string":
18+
{
19+
"id": 103,
20+
"label": "String",
21+
"type": "string"
22+
}
23+
}
24+
}

docs/library/js/4.json

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"modules":
3+
[
4+
{
5+
"label": "Arithmetic",
6+
"name": "arithmetic",
7+
"functions":
8+
[
9+
{ "id" : 41, "label": "+", "name" : "+", "arity" : 2, "title" : "Inputs:\n • number\n • number\nOutput: number" },
10+
{ "id" : 42, "label": "-", "name" : "-", "arity" : 2, "title" : "Inputs:\n • number\n • number\nOutput: number" },
11+
{ "id" : 43, "label": "*", "name" : "*", "arity" : 2, "title" : "Inputs:\n • number\n • number\nOutput: number" },
12+
{ "id" : 44, "label": "/", "name" : "/", "arity" : 2, "title" : "Inputs:\n • number\n • number\nOutput: number" }
13+
]
14+
},
15+
{
16+
"label": "Convertion",
17+
"name": "parse",
18+
"functions":
19+
[
20+
{ "id" : 51, "label": "toNumber", "name" : "toNumber", "arity" : 1, "title" : "Input: string\nOutput: number" },
21+
{ "id" : 52, "label": "toString", "name" : "toString", "arity" : 1, "title" : "Input: number\nOutput: string" }
22+
]
23+
},
24+
{
25+
"label": "String",
26+
"name": "string",
27+
"functions":
28+
[
29+
{ "id" : 21, "label": "concat", "name" : "concat", "arity" : 2, "title" : "Inputs:\n • string\n • string\nOutput: string" },
30+
{ "id" : 22, "label": "length", "name" : "length", "arity" : 1, "title" : "Input: string\nOutput: number" },
31+
{ "id" : 23, "label": "reverse", "name" : "reverse", "arity" : 1, "title" : "Input: string\nOutput: string" }
32+
]
33+
}
34+
],
35+
"primitives":
36+
{
37+
"number":
38+
{
39+
"id": 102,
40+
"label": "Number",
41+
"type": "number"
42+
},
43+
"string":
44+
{
45+
"id": 103,
46+
"label": "String",
47+
"type": "string"
48+
}
49+
}
50+
}

docs/tutorial/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31495,7 +31495,7 @@ var receiveLibrary = function receiveLibrary(items) {
3149531495
var fetchLibrary = function fetchLibrary(id) {
3149631496
return function (dispatch) {
3149731497
dispatch(requestLibrary());
31498-
return (0, _isomorphicFetch2.default)('/library/js/' + id).then(function (response) {
31498+
return (0, _isomorphicFetch2.default)('/library/js/' + id + '.json').then(function (response) {
3149931499
return response.json();
3150031500
}).then(function (items) {
3150131501
return dispatch(receiveLibrary(items));

src/actions/requestLibraryActions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const receiveLibrary = (items) => {
2828
const fetchLibrary = (id) => {
2929
return dispatch => {
3030
dispatch(requestLibrary())
31-
return fetch(`https://demo5895613.mockable.io/library/js/${id}`)
31+
return fetch(`/library/js/${id}.json`)
3232
.then(response => response.json())
3333
.then(items => dispatch(receiveLibrary(items)))
3434
}

0 commit comments

Comments
 (0)