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

Method checkStdArrayObj

builtin_array.go:1423–1433  ·  view source on GitHub ↗
(obj *Object)

Source from the content-addressed store, hash-verified

1421}
1422
1423func (r *Runtime) checkStdArrayObj(obj *Object) *arrayObject {
1424 if arr, ok := obj.self.(*arrayObject); ok &&
1425 arr.propValueCount == 0 &&
1426 arr.length == uint32(len(arr.values)) &&
1427 uint32(arr.objCount) == arr.length {
1428
1429 return arr
1430 }
1431
1432 return nil
1433}
1434
1435func (r *Runtime) checkStdArrayObjWithProto(obj *Object) *arrayObject {
1436 if arr := r.checkStdArrayObj(obj); arr != nil {

Callers 15

arrayproto_sliceMethod · 0.95
arrayproto_sortMethod · 0.95
arrayproto_spliceMethod · 0.95
arrayproto_indexOfMethod · 0.95
arrayproto_includesMethod · 0.95
arrayproto_filterMethod · 0.95
arrayproto_reverseMethod · 0.95
arrayproto_copyWithinMethod · 0.95
arrayproto_fillMethod · 0.95
arrayproto_withMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected