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

Method Len

value.go:336–340  ·  view source on GitHub ↗

Len returns the length of the array.

()

Source from the content-addressed store, hash-verified

334
335// Len returns the length of the array.
336func (v *Value) Len() int64 {
337 length := v.Get("length")
338 defer length.Free()
339 return length.ToInt64()
340}
341
342// ByteLen returns the length of the ArrayBuffer.
343func (v *Value) ByteLen() int64 {

Callers 13

TestContextTypedArraysFunction · 0.80
isEmptyValueFunction · 0.80
marshalGenericArrayMethod · 0.80
marshalArrayMethod · 0.80
unmarshalSliceMethod · 0.80
unmarshalArrayMethod · 0.80
unmarshalInterfaceMethod · 0.80
TestTypedArraysFunction · 0.80
TestComplexTypesFunction · 0.80
TestValueArrayBufferFunction · 0.80
TestValueTypedArraysFunction · 0.80

Calls 3

GetMethod · 0.95
ToInt64Method · 0.80
FreeMethod · 0.45

Tested by 7

TestContextTypedArraysFunction · 0.64
TestTypedArraysFunction · 0.64
TestComplexTypesFunction · 0.64
TestValueArrayBufferFunction · 0.64
TestValueTypedArraysFunction · 0.64