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

Method getOwnPropStr

string.go:176–186  ·  view source on GitHub ↗
(name unistring.String)

Source from the content-addressed store, hash-verified

174}
175
176func (s *stringObject) getOwnPropStr(name unistring.String) Value {
177 if i := strToGoIdx(name); i >= 0 && i < s.length {
178 val := s._getIdx(i)
179 return &valueProperty{
180 value: val,
181 enumerable: true,
182 }
183 }
184
185 return s.baseObject.getOwnPropStr(name)
186}
187
188func (s *stringObject) getOwnPropIdx(idx valueInt) Value {
189 i := int64(idx)

Callers 1

setForeignStrMethod · 0.95

Calls 3

_getIdxMethod · 0.95
strToGoIdxFunction · 0.85
getOwnPropStrMethod · 0.65

Tested by

no test coverage detected