-
Notifications
You must be signed in to change notification settings - Fork 25
/
join.json
113 lines (113 loc) · 3.12 KB
/
join.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"join": [
{
"expr": "join(github.event.issue.labels.*.name, ', ')",
"contexts": {
"github": {
"event": {
"issue": {
"labels": [
{
"name": "bug"
},
{
"name": "enhancement"
},
{
"name": "help wanted"
}
]
}
}
}
},
"result": { "kind": "String", "value": "bug, enhancement, help wanted" }
},
{
"expr": "join(null)",
"result": { "kind": "String", "value": "" }
},
{
"expr": "join(true)",
"result": { "kind": "String", "value": "true" }
},
{
"expr": "join(123.456)",
"result": { "kind": "String", "value": "123.456" }
},
{
"expr": "join('abc')",
"result": { "kind": "String", "value": "abc" }
},
{
"expr": "join(myArray)",
"contexts": { "myArray": [] },
"result": { "kind": "String", "value": "" }
},
{
"expr": "join(myObject)",
"contexts": { "myObject": {} },
"result": { "kind": "String", "value": "" }
},
{
"expr": "join(myObject)",
"contexts": { "myObject": { "key1": "value1" } },
"result": { "kind": "String", "value": "" }
},
{
"expr": "join(myArray)",
"contexts": { "myArray": [ null, true, 123.456, "abc", [], ["def"], {}, { "key1": "value1" } ] },
"result": { "kind": "String", "value": ",true,123.456,abc,Array,Array,Object,Object" }
},
{
"expr": "join(myArray, null)",
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
"result": { "kind": "String", "value": "_ITEM-1__ITEM-2__ITEM-3_" }
},
{
"expr": "join(myArray, true)",
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
"result": { "kind": "String", "value": "_ITEM-1_true_ITEM-2_true_ITEM-3_" }
},
{
"expr": "join(myArray, 123.456)",
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
"result": { "kind": "String", "value": "_ITEM-1_123.456_ITEM-2_123.456_ITEM-3_" }
},
{
"expr": "join(myArray, ' | ')",
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
"result": { "kind": "String", "value": "_ITEM-1_ | _ITEM-2_ | _ITEM-3_" }
},
{
"expr": "join(myArray, mySeparator)",
"contexts": {
"myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ],
"mySeparator": []
},
"result": { "kind": "String", "value": "_ITEM-1_,_ITEM-2_,_ITEM-3_" }
},
{
"expr": "join(myArray, mySeparator)",
"contexts": {
"myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ],
"mySeparator": {}
},
"result": { "kind": "String", "value": "_ITEM-1_,_ITEM-2_,_ITEM-3_" }
},
{
"expr": "join()",
"err": {
"kind": "parsing",
"value": "Too few parameters supplied: "
}
},
{
"expr": "join(1, 2, 3)",
"err": {
"kind": "parsing",
"value": "Too many parameters supplied: "
}
}
]
}