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

Method hasProperty

object.go:1463–1472  ·  view source on GitHub ↗
(p Value)

Source from the content-addressed store, hash-verified

1461}
1462
1463func (o *Object) hasProperty(p Value) bool {
1464 switch p := p.(type) {
1465 case valueInt:
1466 return o.self.hasPropertyIdx(p)
1467 case *Symbol:
1468 return o.self.hasPropertySym(p)
1469 default:
1470 return o.self.hasPropertyStr(p.string())
1471 }
1472}
1473
1474func (o *Object) setStr(name unistring.String, val, receiver Value, throw bool) bool {
1475 if receiver == o {

Callers 5

flattenIntoArrayMethod · 0.80
execMethod · 0.80
builtin_reflect_hasMethod · 0.80
builtin_ErrorMethod · 0.80

Calls 4

hasPropertyIdxMethod · 0.65
hasPropertySymMethod · 0.65
hasPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected