Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
serialize(type, value) {
const buffer = new Serialize.SerialBuffer({textEncoder: new TextEncoder, textDecoder: new TextDecoder});
Serialize.getType(this.types, type).serialize(buffer, value);
return buffer.asUint8Array();
}