mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
v.gen.js: implement most of array and map methods in builtin/js (#10806)
This commit is contained in:
parent
027be2ecd4
commit
06edbc8a38
4 changed files with 168 additions and 14 deletions
14
vlib/builtin/js/map.js.v
Normal file
14
vlib/builtin/js/map.js.v
Normal 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue