Commit 47e7812e58c75d80ee9f2ecbfea4bebff00c91f0
1 parent
b342b221
added a function to format a javascript function call
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
web/js_tools.anubis
| ... | ... | @@ -6,6 +6,8 @@ |
| 6 | 6 | * © Calexium |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +read tools/basis.anubis | |
| 10 | + | |
| 9 | 11 | define List(Word8) |
| 10 | 12 | make_js_string |
| 11 | 13 | ( |
| ... | ... | @@ -35,3 +37,11 @@ public define String |
| 35 | 37 | ) |
| 36 | 38 | = |
| 37 | 39 | implode(make_js_string(explode(str), [])). |
| 40 | + | |
| 41 | +public define String | |
| 42 | + format_js_function_call | |
| 43 | + ( | |
| 44 | + String name, | |
| 45 | + List(String) args | |
| 46 | + ) = | |
| 47 | + name + "(" + concat(args, ",") + ");". | ... | ... |