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

Method getOwnProp

object.go:1441–1450  ·  view source on GitHub ↗
(p Value)

Source from the content-addressed store, hash-verified

1439}
1440
1441func (o *Object) getOwnProp(p Value) Value {
1442 switch p := p.(type) {
1443 case valueInt:
1444 return o.self.getOwnPropIdx(p)
1445 case *Symbol:
1446 return o.self.getOwnPropSym(p)
1447 default:
1448 return o.self.getOwnPropStr(p.string())
1449 }
1450}
1451
1452func (o *Object) hasOwnProperty(p Value) bool {
1453 switch p := p.(type) {

Callers 10

keysMethod · 0.80
proxyOwnKeysMethod · 0.80
nextMethod · 0.80
object_freezeMethod · 0.80
object_isSealedMethod · 0.80
object_isFrozenMethod · 0.80

Calls 4

getOwnPropIdxMethod · 0.65
getOwnPropSymMethod · 0.65
getOwnPropStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected