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

Method HasIdx

value.go:565–569  ·  view source on GitHub ↗

HasIdx returns true if the value has the property with the given index.

(idx uint32)

Source from the content-addressed store, hash-verified

563
564// HasIdx returns true if the value has the property with the given index.
565func (v *Value) HasIdx(idx uint32) bool {
566 prop := v.ctx.NewAtomIdx(idx)
567 defer prop.Free()
568 return C.JS_HasProperty(v.ctx.ref, v.ref, prop.ref) == 1
569}
570
571// Delete deletes the property with the given name.
572func (v *Value) Delete(name string) bool {

Callers 2

DeleteIdxMethod · 0.95
TestValuePropertiesFunction · 0.80

Calls 2

NewAtomIdxMethod · 0.80
FreeMethod · 0.45

Tested by 1

TestValuePropertiesFunction · 0.64