Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Serializer.prototype.stringToByteArray = function (msg/* : string */) {
const bytes = new Uint8Array(utf8.length(msg))
utf8.write(msg, bytes, 0)
return bytes
}