Libraryless. Click here for Pure Java version (3224L/19K).
1 | sS javaValueToHTML(O value, Set seen default identityHashSet()) { |
2 | if (!seen.add(value)) ret "see above"; |
3 | if (value cast S) |
4 | ret htmlEncode_quote(value); |
5 | else if (value cast L) |
6 | ret ol(map(value, v -> javaValueToHTML(v, seen))); |
7 | else |
8 | ret htmlEncode(shorten(str(value))); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030909 |
Snippet name: | javaValueToHTML |
Eternal ID of this version: | #1030909/1 |
Text MD5: | 7bbb861c80e5f815805cde8d999855b1 |
Transpilation MD5: | 98b6165557e30ee5f6bc5759a6dc84db |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-08 18:05:37 |
Source code size: | 297 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 180 / 267 |
Referenced in: | [show references] |