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

Method deleteStr

array_sparse.go:410–415  ·  view source on GitHub ↗
(name unistring.String, throw bool)

Source from the content-addressed store, hash-verified

408}
409
410func (a *sparseArrayObject) deleteStr(name unistring.String, throw bool) bool {
411 if idx := strToArrayIdx(name); idx != math.MaxUint32 {
412 return a._deleteIdxProp(idx, throw)
413 }
414 return a.baseObject.deleteStr(name, throw)
415}
416
417func (a *sparseArrayObject) deleteIdx(idx valueInt, throw bool) bool {
418 if idx := toIdx(idx); idx != math.MaxUint32 {

Callers

nothing calls this directly

Calls 3

_deleteIdxPropMethod · 0.95
strToArrayIdxFunction · 0.85
deleteStrMethod · 0.65

Tested by

no test coverage detected