generated from fastn-stack/fastn-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.ftd
59 lines (39 loc) · 1.36 KB
/
utils.ftd
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
-- import: fastn-stack.github.io/fastn-js/assets
-- void download-as-image(element_id,filename):
string element_id:
string filename:
js: [//cdnjs.cloudflare.com/ajax/libs/html-to-image/1.11.11/html-to-image.min.js, $assets.files.download.js]
download_as_image(element_id, filename)
-- void download-as-png(element_id,filename):
string element_id:
string filename:
js: [//cdnjs.cloudflare.com/ajax/libs/html-to-image/1.11.11/html-to-image.min.js, $assets.files.download.js]
download_as_png(element_id, filename)
-- void download-as-jpeg(element_id,filename):
string element_id:
string filename:
js: [//cdnjs.cloudflare.com/ajax/libs/html-to-image/1.11.11/html-to-image.min.js, $assets.files.download.js]
download_as_jpeg(element_id, filename)
-- void download-as-svg(element_id,filename):
string element_id:
string filename:
js: [//cdnjs.cloudflare.com/ajax/libs/html-to-image/1.11.11/html-to-image.min.js, $assets.files.download.js]
download_as_svg(element_id, filename)
-- void clamp-increment(a,by,min,max):
integer $a:
integer by: 1
integer min: 0
integer max: 5
a = (((a - min) + by) % (max - min)) + min
-- void clamp-decrement(a,by,min,max):
integer $a:
integer by: 1
integer min: 0
integer max: 5
js: [$assets.files.lib.js]
clampDecrement(a, by, min, max)
-- integer list range(min,max):
integer min: 0
integer max:
js: [$assets.files.lib.js]
getRange(min, max)