chore: defaults

This commit is contained in:
cha0s 2020-12-10 19:32:34 -06:00
parent e2d9b196d9
commit 8676d69892

View File

@ -14,12 +14,16 @@ export default class Packet {
id: 'uint32',
nsp: 'string',
type: 'uint8',
data: this.data || {},
data: this.data,
});
}
return this._builder;
}
static get data() {
return {};
}
static pack(packet) {
return this.builder.encode({
id: packet.id || 0,