MCPcopy Create free account
hub / github.com/Constellation/iv / ArrayIsArray

Function ArrayIsArray

iv/lv5/runtime/array.cc:75–85  ·  view source on GitHub ↗

section 15.4.3.2 Array.isArray(arg)

Source from the content-addressed store, hash-verified

73
74// section 15.4.3.2 Array.isArray(arg)
75JSVal ArrayIsArray(const Arguments& args, Error* e) {
76 IV_LV5_CONSTRUCTOR_CHECK("Array.isArray", args, e);
77 if (args.empty()) {
78 return JSFalse;
79 }
80 const JSVal val = args.front();
81 if (!val.IsObject()) {
82 return JSFalse;
83 }
84 return JSVal::Bool(val.object()->IsClass<Class::Array>());
85}
86
87// strawman / ES.next Array extras
88//

Callers

nothing calls this directly

Calls 5

BoolFunction · 0.85
IsObjectMethod · 0.80
objectMethod · 0.80
emptyMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected