UNPKG

rsocket-rxjs

Version:
16 lines (15 loc) 422 B
export class Payload { constructor(data, metadata = new Uint8Array(0)) { this.data = data; this.metadata = metadata; if (this.data == undefined) { this.data = new Uint8Array(0); } if (this.metadata == undefined) { this.metadata == new Uint8Array(0); } } hasMetadata() { return this.metadata.byteLength > 0; } }