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

Function isArray

runtime.go:2861–2875  ·  view source on GitHub ↗
(object *Object)

Source from the content-addressed store, hash-verified

2859}
2860
2861func isArray(object *Object) bool {
2862 self := object.self
2863 if proxy, ok := self.(*proxyObject); ok {
2864 if proxy.target == nil {
2865 panic(typeError("Cannot perform 'IsArray' on a proxy that has been revoked"))
2866 }
2867 return isArray(proxy.target)
2868 }
2869 switch self.className() {
2870 case classArray:
2871 return true
2872 default:
2873 return false
2874 }
2875}
2876
2877func isRegexp(v Value) bool {
2878 if o, ok := v.(*Object); ok {

Callers 8

arraySpeciesCreateFunction · 0.85
isConcatSpreadableFunction · 0.85
flattenIntoArrayMethod · 0.85
array_isArrayMethod · 0.85
builtinJSON_stringifyMethod · 0.85
strMethod · 0.85
objectproto_toStringMethod · 0.85

Calls 2

typeErrorTypeAlias · 0.85
classNameMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…