Skip to content

Commit

Permalink
priv func to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
louisheath committed Mar 19, 2024
1 parent 63ef9a8 commit 8947f46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions expr/js_eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ func EvaluateJavascript(ctx context.Context, source string, subject any, logger

}

func isArray(value otto.Value) bool {
return value.IsObject() &&
(value.Object().Class() == "Array" || value.Object().Class() == "GoSlice")
}

func EvaluateArray[ReturnType any](ctx context.Context, source string, subject any, logger kitlog.Logger) ([]ReturnType, error) {
result, err := EvaluateJavascript(ctx, source, subject, logger)
if err != nil {
Expand Down Expand Up @@ -240,3 +235,8 @@ func SafelyGo(do func()) {
do()
}()
}

func isArray(value otto.Value) bool {
return value.IsObject() &&
(value.Object().Class() == "Array" || value.Object().Class() == "GoSlice")
}

0 comments on commit 8947f46

Please sign in to comment.