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

Method hasOwnProperty

object.go:1452–1461  ·  view source on GitHub ↗
(p Value)

Source from the content-addressed store, hash-verified

1450}
1451
1452func (o *Object) hasOwnProperty(p Value) bool {
1453 switch p := p.(type) {
1454 case valueInt:
1455 return o.self.hasOwnPropertyIdx(p)
1456 case *Symbol:
1457 return o.self.hasOwnPropertySym(p)
1458 default:
1459 return o.self.hasOwnPropertyStr(p.string())
1460 }
1461}
1462
1463func (o *Object) hasProperty(p Value) bool {
1464 switch p := p.(type) {

Callers 2

object_hasOwnMethod · 0.80

Calls 4

hasOwnPropertyIdxMethod · 0.65
hasOwnPropertySymMethod · 0.65
hasOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected