MCPcopy Index your code
hub / github.com/coder/websocket / extractArrayBuffer

Function extractArrayBuffer

internal/wsjs/wsjs_js.go:158–163  ·  view source on GitHub ↗
(arrayBuffer js.Value)

Source from the content-addressed store, hash-verified

156}
157
158func extractArrayBuffer(arrayBuffer js.Value) []byte {
159 uint8Array := js.Global().Get("Uint8Array").New(arrayBuffer)
160 dst := make([]byte, uint8Array.Length())
161 js.CopyBytesToGo(dst, uint8Array)
162 return dst
163}
164
165func uint8Array(src []byte) js.Value {
166 uint8Array := js.Global().Get("Uint8Array").New(len(src))

Callers 1

OnMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…