MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / isJsArray

Function isJsArray

AdaptixServer/core/axscript/bridge_command.go:346–360  ·  view source on GitHub ↗

Helpers

(rt *goja.Runtime, obj *goja.Object)

Source from the content-addressed store, hash-verified

344/// Helpers
345
346func isJsArray(rt *goja.Runtime, obj *goja.Object) (bool, error) {
347 arrayConstructor := rt.Get("Array")
348 if arrayConstructor == nil {
349 return false, nil
350 }
351 isArrayFn, ok := goja.AssertFunction(arrayConstructor.ToObject(rt).Get("isArray"))
352 if !ok {
353 return false, nil
354 }
355 result, err := isArrayFn(goja.Undefined(), obj)
356 if err != nil {
357 return false, err
358 }
359 return result.ToBoolean(), nil
360}
361
362func extractCommandBuilder(val goja.Value) *jsCommandBuilder {
363 if goja.IsUndefined(val) || goja.IsNull(val) {

Callers 3

AddSubCommandsMethod · 0.85
SetParamsMethod · 0.85
AddMethod · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected