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

Method getArray

builtin_array.go:1694–1702  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1692}
1693
1694func (r *Runtime) getArray() *Object {
1695 ret := r.global.Array
1696 if ret == nil {
1697 ret = &Object{runtime: r}
1698 ret.self = r.createArray(ret)
1699 r.global.Array = ret
1700 }
1701 return ret
1702}
1703
1704func (r *Runtime) createArray(val *Object) objectImpl {
1705 o := r.newNativeFuncConstructObj(val, r.builtin_newArray, "Array", r.getArrayPrototype(), 1)

Callers 2

createArrayProtoTemplateFunction · 0.80

Calls 1

createArrayMethod · 0.95

Tested by

no test coverage detected