js: fix rand build, properly use key values on map, add rand.string (#12020)

This commit is contained in:
playX 2021-10-01 21:23:49 +03:00 committed by GitHub
parent 60ecbec8ea
commit 82f187e5e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 186 additions and 39 deletions

7
vlib/rand/rand_test.js.v Normal file
View file

@ -0,0 +1,7 @@
import rand
fn test_string() {
res := rand.string(4)
assert res.len == 4
println(res)
}