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

Method typedArrayType

value.go:1250–1259  ·  view source on GitHub ↗

TypedArray detection methods

()

Source from the content-addressed store, hash-verified

1248
1249// TypedArray detection methods
1250func (v *Value) typedArrayType() (int, bool) {
1251 if v == nil {
1252 return -1, false
1253 }
1254 typeID := int(C.JS_GetTypedArrayType(v.ref))
1255 if typeID < 0 {
1256 return typeID, false
1257 }
1258 return typeID, true
1259}
1260
1261func (v *Value) IsTypedArray() bool {
1262 _, ok := v.typedArrayType()

Callers 12

IsTypedArrayMethod · 0.95
IsInt8ArrayMethod · 0.95
IsUint8ArrayMethod · 0.95
IsUint8ClampedArrayMethod · 0.95
IsInt16ArrayMethod · 0.95
IsUint16ArrayMethod · 0.95
IsInt32ArrayMethod · 0.95
IsUint32ArrayMethod · 0.95
IsFloat32ArrayMethod · 0.95
IsFloat64ArrayMethod · 0.95
IsBigInt64ArrayMethod · 0.95
IsBigUint64ArrayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected