From 3a4b1f08e35cb98743e5ce84572f3a92aca97e1c Mon Sep 17 00:00:00 2001 From: Marcin Maluszczak <297255+malumar@users.noreply.github.com> Date: Fri, 6 Oct 2023 13:25:16 +0200 Subject: [PATCH] support codecs from js client (#13) --- convert_js.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/convert_js.go b/convert_js.go index 6045834..994aad2 100644 --- a/convert_js.go +++ b/convert_js.go @@ -1,9 +1,15 @@ +//go:build js // +build js + // Copyright (c) Roman Atachiants and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. package binary +func ToBytes(v string) (b []byte) { + return []byte(v) +} + func binaryToString(buf *[]byte) string { return string(*buf) }