< Summary

Information
Class: Elsa.Expressions.JavaScript.Helpers.VariableNameValidator
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Helpers/VariableNameValidator.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 9
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsValidVariableName(...)50%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Helpers/VariableNameValidator.cs

#LineLine coverage
 1namespace Elsa.Expressions.JavaScript.Helpers;
 2
 3public static class VariableNameValidator
 4{
 5    public static bool IsValidVariableName(string name)
 6    {
 3827        return !string.IsNullOrWhiteSpace(name) && name.All(char.IsLetterOrDigit);
 8    }
 9}