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

Method isValidIntegerIndex

typedarrays.go:779–786  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

777}
778
779func (a *typedArrayObject) isValidIntegerIndex(idx int) bool {
780 if a.viewedArrayBuf.ensureNotDetached(false) {
781 if idx >= 0 && idx < a.length {
782 return true
783 }
784 }
785 return false
786}
787
788func (a *typedArrayObject) _putIdx(idx int, v Value) {
789 switch a.typedArray.(type) {

Callers 15

_putIdxMethod · 0.95
_hasIdxMethod · 0.95
setForeignStrMethod · 0.95
setForeignIdxMethod · 0.95
_defineIdxPropertyMethod · 0.95
deleteStrMethod · 0.95
typedArrayProto_everyMethod · 0.80
typedArrayProto_findMethod · 0.80

Calls 1

ensureNotDetachedMethod · 0.80

Tested by

no test coverage detected