mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-20 04:54:07 +02:00
added jsvm sleep binding
This commit is contained in:
1 parent
64cee264f0
commit
c4116e3a7d
5 files changed
+4531
-4472
No files matched your search
@@ -299,6 +299,10 @@ func baseBinds(vm *goja.Runtime) {
|
||||
return string(bodyBytes), nil
|
||||
})
|
||||
|
||||
vm.Set("sleep", func(milliseconds int64) {
|
||||
time.Sleep(time.Duration(milliseconds) * time.Millisecond)
|
||||
})
|
||||
|
||||
vm.Set("arrayOf", func(model any) any {
|
||||
mt := reflect.TypeOf(model)
|
||||
st := reflect.SliceOf(mt)
|
||||
|
||||
Reference in new issue
Block a user