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

Function ExampleObject_Delete

object_test.go:487–496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

485}
486
487func ExampleObject_Delete() {
488 vm := New()
489 obj := vm.NewObject()
490 _ = obj.Set("test", true)
491 before := obj.Get("test")
492 _ = obj.Delete("test")
493 after := obj.Get("test")
494 fmt.Printf("before: %v, after: %v", before, after)
495 // Output: before: true, after: <nil>
496}
497
498func ExampleObject_GetOwnPropertyNames() {
499 vm := New()

Callers

nothing calls this directly

Calls 5

SetMethod · 0.95
GetMethod · 0.95
DeleteMethod · 0.95
NewFunction · 0.85
NewObjectMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…