v.gen.js: implement most of array and map methods in builtin/js (#10806)

This commit is contained in:
playX 2021-07-15 17:36:53 +03:00 committed by GitHub
parent 027be2ecd4
commit 06edbc8a38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 168 additions and 14 deletions

14
vlib/builtin/js/map.js.v Normal file
View file

@ -0,0 +1,14 @@
module builtin
struct map {
m JS.Map
len int
}
// Removes the mapping of a particular key from the map.
[unsafe]
pub fn (mut m map) delete(key voidptr) {
#m.m.delete(key)
}
pub fn (m &map) free() {}