altmp / altv-js-module-v2

alt:V JavaScript v2 module
MIT License
10 stars 9 forks source link

fix(shared): include integer keys in js::Object::GetKeys #245

Closed xxshady closed 3 months ago

xxshady commented 3 months ago

fixes object serialization

import alt from '@altv/server'

alt.meta.test = {
  items: {
    1: {},
    normalKey: {}
  }
}

console.log(alt.meta.test)

before:

{ items: { normalKey: {} } }

after:

{ items: { '1': {}, normalKey: {} } }