MCPcopy Create free account
hub / github.com/buke/quickjs-go / ByteLen

Method ByteLen

value.go:343–347  ·  view source on GitHub ↗

ByteLen returns the length of the ArrayBuffer.

()

Source from the content-addressed store, hash-verified

341
342// ByteLen returns the length of the ArrayBuffer.
343func (v *Value) ByteLen() int64 {
344 byteLength := v.Get("byteLength")
345 defer byteLength.Free()
346 return byteLength.ToInt64()
347}
348
349// Set sets the value of the property with the given name.
350func (v *Value) Set(name string, val *Value) {

Callers 6

ToByteArrayMethod · 0.95
TestContextBasicsFunction · 0.80
unmarshalSliceMethod · 0.80
unmarshalInterfaceMethod · 0.80
TestTypedArraysFunction · 0.80
TestValueArrayBufferFunction · 0.80

Calls 3

GetMethod · 0.95
ToInt64Method · 0.80
FreeMethod · 0.45

Tested by 3

TestContextBasicsFunction · 0.64
TestTypedArraysFunction · 0.64
TestValueArrayBufferFunction · 0.64