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

Method PropertyNames

value.go:545–555  ·  view source on GitHub ↗

PropertyNames returns the names of the properties of the value.

()

Source from the content-addressed store, hash-verified

543
544// PropertyNames returns the names of the properties of the value.
545func (v *Value) PropertyNames() ([]string, error) {
546 pList, err := v.propertyEnum()
547 if err != nil {
548 return nil, err
549 }
550 names := make([]string, len(pList))
551 for i := 0; i < len(names); i++ {
552 names[i] = pList[i].ToString()
553 }
554 return names, nil
555}
556
557// Has returns true if the value has the property with the given name.
558func (v *Value) Has(name string) bool {

Callers 4

TestAtomWithObjectsFunction · 0.80
unmarshalMapMethod · 0.80
unmarshalInterfaceMethod · 0.80
TestValuePropertiesFunction · 0.80

Calls 2

propertyEnumMethod · 0.95
ToStringMethod · 0.45

Tested by 2

TestAtomWithObjectsFunction · 0.64
TestValuePropertiesFunction · 0.64