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

Method defineOwnPropertyIdx

array_sparse.go:386–391  ·  view source on GitHub ↗
(idx valueInt, descr PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

384}
385
386func (a *sparseArrayObject) defineOwnPropertyIdx(idx valueInt, descr PropertyDescriptor, throw bool) bool {
387 if idx := toIdx(idx); idx != math.MaxUint32 {
388 return a._defineIdxProperty(idx, descr, throw)
389 }
390 return a.baseObject.defineOwnPropertyStr(idx.string(), descr, throw)
391}
392
393func (a *sparseArrayObject) _deleteIdxProp(idx uint32, throw bool) bool {
394 i := a.findIdx(idx)

Callers

nothing calls this directly

Calls 4

_defineIdxPropertyMethod · 0.95
toIdxFunction · 0.85
defineOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected