Skip to content

Commit 352641c

Browse files
committed
comments added in placeholder
1 parent f99e2ba commit 352641c

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

editor/main.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ const ip = new CodeMirror((elt) => {
1414
indentWithTabs: true,
1515
lineWrapping: true
1616
});
17-
ip.setValue(`string.split('.') => [
18-
base64 => json => {
19-
alg: string._allowed('HS256', 'HS512'),
20-
typ: string._allowed('JWT'),
17+
ip.setValue(`string.split('.') => [ /* Split into three parts; */
18+
base64 => json => { /* Convert from base64; Parse JSON; */
19+
alg: string.allowed('HS256', 'HS512'), /* Test for supported algo type */
20+
typ: string.allowed('JWT'),
2121
},
22-
base64 => json => {
23-
exp: unsigned,
24-
iat: unsigned,
25-
nbf: unsigned,
26-
?name: ([..2..string,].join(' ')|string),
22+
base64 => json => { /* Convert from base64; Parse JSON; */
23+
?exp: unsigned, /* Optional exp */
24+
?iat: unsigned, /* Optional iat */
25+
?nbf: unsigned, /* Optional nbf */
26+
?name: ([..2..string,].join(' ')|string), /* Name can be:
27+
an array with first-name and last-name
28+
OR
29+
a string containing the full-name
30+
*/
2731
?city(='Somewhere'): string,
28-
?vals: [...int],
2932
...
3033
},
31-
base64
34+
base64 /* Convert from base64; */
3235
]`);
3336
const op = new CodeMirror((elt) => {
3437
let op = document.querySelector('#op');

0 commit comments

Comments
 (0)