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

Method getOwnPropStr

array_sparse.go:125–133  ·  view source on GitHub ↗
(name unistring.String)

Source from the content-addressed store, hash-verified

123}
124
125func (a *sparseArrayObject) getOwnPropStr(name unistring.String) Value {
126 if idx := strToArrayIdx(name); idx != math.MaxUint32 {
127 return a._getIdx(idx)
128 }
129 if name == "length" {
130 return a.getLengthProp()
131 }
132 return a.baseObject.getOwnPropStr(name)
133}
134
135func (a *sparseArrayObject) getOwnPropIdx(idx valueInt) Value {
136 if idx := toIdx(idx); idx != math.MaxUint32 {

Callers 2

getStrMethod · 0.95
setForeignStrMethod · 0.95

Calls 4

_getIdxMethod · 0.95
getLengthPropMethod · 0.95
strToArrayIdxFunction · 0.85
getOwnPropStrMethod · 0.65

Tested by

no test coverage detected