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

Method setForeignStr

typedarrays.go:822–833  ·  view source on GitHub ↗
(p unistring.String, v, receiver Value, throw bool)

Source from the content-addressed store, hash-verified

820}
821
822func (a *typedArrayObject) setForeignStr(p unistring.String, v, receiver Value, throw bool) (res bool, handled bool) {
823 idx, ok := strToIntNum(p)
824 if ok {
825 if !a.isValidIntegerIndex(idx) {
826 return true, true
827 }
828 } else if idx == 0 {
829 return true, true
830 }
831
832 return a._setForeignStr(p, a.getOwnPropStr(p), v, receiver, throw)
833}
834
835func (a *typedArrayObject) setForeignIdx(p valueInt, v, receiver Value, throw bool) (res bool, handled bool) {
836 if !a.isValidIntegerIndex(toIntClamp(int64(p))) {

Callers

nothing calls this directly

Calls 4

isValidIntegerIndexMethod · 0.95
getOwnPropStrMethod · 0.95
strToIntNumFunction · 0.85
_setForeignStrMethod · 0.80

Tested by

no test coverage detected