js-runtime: Add Object.attributeCount to get the number of user added
attributes to that object
This commit is contained in:
parent
1919595adc
commit
e8f5ca9117
2 changed files with 10 additions and 0 deletions
|
|
@ -252,6 +252,11 @@ const zig = {
|
|||
delete values[id][index];
|
||||
},
|
||||
|
||||
zigGetAttributeCount(id) {
|
||||
let obj = values[id];
|
||||
return Object.keys(obj).length;
|
||||
},
|
||||
|
||||
zigCleanupObject(id) {
|
||||
const idx = Number(id);
|
||||
delete value_map[values[idx].__uindex];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue