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

Method GetIdx

value.go:382–387  ·  view source on GitHub ↗

GetIdx returns the value of the property with the given index.

(idx int64)

Source from the content-addressed store, hash-verified

380
381// GetIdx returns the value of the property with the given index.
382func (v *Value) GetIdx(idx int64) *Value {
383 if !v.hasValidContext() {
384 return nil
385 }
386 return &Value{ctx: v.ctx, ref: C.JS_GetPropertyUint32(v.ctx.ref, v.ref, C.uint32_t(idx))}
387}
388
389// Call calls the function with the given arguments.
390func (v *Value) Call(fname string, args ...*Value) *Value {

Calls 1

hasValidContextMethod · 0.95