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:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user