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

Method IsExtensible

value.go:770–779  ·  view source on GitHub ↗

IsExtensible returns true if new properties can still be added.

()

Source from the content-addressed store, hash-verified

768
769// IsExtensible returns true if new properties can still be added.
770func (v *Value) IsExtensible() bool {
771 if !v.isAlive() {
772 return false
773 }
774 ret := C.JS_IsExtensible(v.ctx.ref, v.ref)
775 if ret < 0 {
776 return false
777 }
778 return ret == 1
779}
780
781// PreventExtensions marks object as non-extensible.
782func (v *Value) PreventExtensions() bool {

Calls 1

isAliveMethod · 0.95