Skip to content

Commit 3a4b1f0

Browse files
authored
support codecs from js client (#13)
1 parent 30053c2 commit 3a4b1f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

convert_js.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
//go:build js
12
// +build js
3+
24
// Copyright (c) Roman Atachiants and contributors. All rights reserved.
35
// Licensed under the MIT license. See LICENSE file in the project root for details.
46

57
package binary
68

9+
func ToBytes(v string) (b []byte) {
10+
return []byte(v)
11+
}
12+
713
func binaryToString(buf *[]byte) string {
814
return string(*buf)
915
}

0 commit comments

Comments
 (0)