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

Method defineOwnPropertyStr

object_dynamic.go:692–700  ·  view source on GitHub ↗
(name unistring.String, desc PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

690}
691
692func (a *dynamicArray) defineOwnPropertyStr(name unistring.String, desc PropertyDescriptor, throw bool) bool {
693 if a.checkDynamicObjectPropertyDescr(name, desc, throw) {
694 if idx, ok := strToInt(name); ok {
695 return a._setIdx(idx, desc.Value, throw)
696 }
697 typeErrorResult(throw, "Cannot define property %q on a dynamic array", name.String())
698 }
699 return false
700}
701
702func (a *dynamicArray) defineOwnPropertyIdx(name valueInt, desc PropertyDescriptor, throw bool) bool {
703 if a.checkDynamicObjectPropertyDescr(name, desc, throw) {

Callers

nothing calls this directly

Calls 5

_setIdxMethod · 0.95
strToIntFunction · 0.85
typeErrorResultFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected