Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-db committed May 30, 2024
1 parent 74d2797 commit 0cc019c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/builtin/js/jsfns.js.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub interface JS.RegExp {
JS.Any
}

pub type SplitSeparator = JS.String | JS.RegExp
pub type SplitSeparator = JS.RegExp | JS.String

@[single_impl]
pub interface JS.String {
Expand Down
2 changes: 2 additions & 0 deletions vlib/builtin/js/string.js.v
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ pub fn (s string) split_any(delim string) []string {

mut regexp := JS.RegExp{}
#regexp = new RegExp('[' + pattern.str + ']', 'g')

tmparr := s.str.split(regexp).map(fn (it JS.Any) JS.Any {
res := ''
#res.str = it

return res
})
_ := tmparr
Expand Down

0 comments on commit 0cc019c

Please sign in to comment.