⚗️ Testing out non-promise functions
This commit is contained in:
parent
5d84d26c3a
commit
5c872efa5c
1 changed files with 5 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
promises "codeberg.org/danjones000/go-promises"
|
promises "codeberg.org/danjones000/go-promises"
|
||||||
|
|
@ -46,5 +47,9 @@ func main() {
|
||||||
return internal.GetUser(name.String(), age.Int()), nil
|
return internal.GetUser(name.String(), age.Int()), nil
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
js.Global().Get("String").Get("prototype").Set("toTitleCase", js.FuncOf(func(this js.Value, _ []js.Value) any {
|
||||||
|
return strings.Title(this.String())
|
||||||
|
}))
|
||||||
|
|
||||||
<-make(chan struct{})
|
<-make(chan struct{})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue