MCPcopy Create free account
hub / github.com/dop251/goja / ExampleObject_GetOwnPropertyNames

Function ExampleObject_GetOwnPropertyNames

object_test.go:498–504  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

496}
497
498func ExampleObject_GetOwnPropertyNames() {
499 vm := New()
500 obj := vm.NewObject()
501 obj.DefineDataProperty("test", vm.ToValue(true), FLAG_TRUE, FLAG_TRUE, FLAG_FALSE) // define a non-enumerable property that Keys() would not return
502 fmt.Print(obj.GetOwnPropertyNames())
503 // Output: [test]
504}
505
506func TestObjectEquality(t *testing.T) {
507 type CustomInt int

Callers

nothing calls this directly

Calls 5

DefineDataPropertyMethod · 0.95
GetOwnPropertyNamesMethod · 0.95
NewFunction · 0.85
NewObjectMethod · 0.80
ToValueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…