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

Method getOwnPropStr

typedarrays.go:731–749  ·  view source on GitHub ↗
(name unistring.String)

Source from the content-addressed store, hash-verified

729}
730
731func (a *typedArrayObject) getOwnPropStr(name unistring.String) Value {
732 idx, ok := strToIntNum(name)
733 if ok {
734 v := a._getIdx(idx)
735 if v != nil {
736 return &valueProperty{
737 value: v,
738 writable: true,
739 enumerable: true,
740 configurable: true,
741 }
742 }
743 return nil
744 }
745 if idx == 0 {
746 return nil
747 }
748 return a.baseObject.getOwnPropStr(name)
749}
750
751func (a *typedArrayObject) getOwnPropIdx(idx valueInt) Value {
752 v := a._getIdx(toIntClamp(int64(idx)))

Callers 1

setForeignStrMethod · 0.95

Calls 3

_getIdxMethod · 0.95
strToIntNumFunction · 0.85
getOwnPropStrMethod · 0.65

Tested by

no test coverage detected