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

Method deleteIdx

array_sparse.go:417–422  ·  view source on GitHub ↗
(idx valueInt, throw bool)

Source from the content-addressed store, hash-verified

415}
416
417func (a *sparseArrayObject) deleteIdx(idx valueInt, throw bool) bool {
418 if idx := toIdx(idx); idx != math.MaxUint32 {
419 return a._deleteIdxProp(idx, throw)
420 }
421 return a.baseObject.deleteStr(idx.string(), throw)
422}
423
424func (a *sparseArrayObject) sortLen() int {
425 if len(a.items) > 0 {

Callers

nothing calls this directly

Calls 4

_deleteIdxPropMethod · 0.95
toIdxFunction · 0.85
deleteStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected