1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js: use prefixed names for functions and global symbols (#11387)

This commit is contained in:
playX
2021-09-08 20:30:46 +03:00
committed by GitHub
parent 96d4a0777f
commit 72089c4feb
25 changed files with 1895 additions and 357 deletions

View File

@@ -1,6 +1,8 @@
module builtin
import strings
// used to generate JS throw statements.
pub fn js_throw(s any) {
#throw s
}
@@ -68,3 +70,12 @@ pub fn unwrap(opt string) string {
return res
}
pub fn (r rune) str() string {
res := ''
mut sb := strings.new_builder(5)
#res.str = r.valueOf().toString()
sb.write_string(res)
return sb.str()
}