Has returns true if the value has the property with the given name.
(name string)
| 556 | |
| 557 | // Has returns true if the value has the property with the given name. |
| 558 | func (v *Value) Has(name string) bool { |
| 559 | prop := v.ctx.NewAtom(name) |
| 560 | defer prop.Free() |
| 561 | return C.JS_HasProperty(v.ctx.ref, v.ref, prop.ref) == 1 |
| 562 | } |
| 563 | |
| 564 | // HasIdx returns true if the value has the property with the given index. |
| 565 | func (v *Value) HasIdx(idx uint32) bool { |