1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 23:24:00 +02:00

synced with master

This commit is contained in:
Gani Georgiev
2023-12-29 23:31:54 +02:00
parent 705d7f48e7
commit 422eb30797
44 changed files with 5069 additions and 5004 deletions

View File

@@ -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)