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

Method deleteStr

object_dynamic.go:716–725  ·  view source on GitHub ↗
(name unistring.String, throw bool)

Source from the content-addressed store, hash-verified

714}
715
716func (a *dynamicArray) deleteStr(name unistring.String, throw bool) bool {
717 if idx, ok := strToInt(name); ok {
718 return a._delete(idx, throw)
719 }
720 if a.hasOwnPropertyStr(name) {
721 typeErrorResult(throw, "Cannot delete property %q on a dynamic array", name.String())
722 return false
723 }
724 return true
725}
726
727func (a *dynamicArray) deleteIdx(idx valueInt, throw bool) bool {
728 return a._delete(toIntStrict(int64(idx)), throw)

Callers

nothing calls this directly

Calls 5

_deleteMethod · 0.95
hasOwnPropertyStrMethod · 0.95
strToIntFunction · 0.85
typeErrorResultFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected