CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--helper-get-function-arity

Helper function to get function arity by analyzing parameter lists for assignment patterns and rest parameters

Overall
score

95%

Overview
Eval results
Files

Evaluation results

100%

Function Arity Validator Plugin

Integration with Babel plugin ecosystem

Criteria
Without context
With context

Import getFunctionArity

100%

100%

Import @babel/types

100%

100%

Plugin structure

100%

100%

Call getFunctionArity

100%

100%

AST node creation

100%

100%

Arity validation logic

100%

100%

Error generation

100%

100%

Function replacement

100%

100%

100%

Function Arity Analyzer

Multiple function type support

Criteria
Without context
With context

Uses getFunctionArity function

100%

100%

Accepts t.Function type

100%

100%

Handles parameter analysis

100%

100%

Integrates @babel/types

100%

100%

100%

15%

Function Parameter Counter

Function arity determination

Criteria
Without context
With context

Import getFunctionArity

100%

100%

Call getFunctionArity

100%

100%

Return arity value

100%

100%

Import Babel types

0%

100%

50%

3%

Function Parameter Analyzer

Complex parameter pattern handling

Criteria
Without context
With context

Uses @babel/parser

100%

100%

Uses getFunctionArity

0%

0%

Extracts function node

70%

100%

Passes to getFunctionArity

0%

0%

Uses @babel/types checks

100%

100%

Detects rest parameters

100%

100%

100%

Function Arity Analyzer

Edge case handling

Criteria
Without context
With context

Import getFunctionArity

100%

100%

Use getFunctionArity function

100%

100%

Empty parameter test

100%

100%

All optional parameters test

100%

100%

Rest parameter only test

100%

100%

Mixed required and optional test

100%

100%

Required plus rest test

100%

100%

100%

30%

Function Signature Analyzer

Static code analysis applications

Criteria
Without context
With context

AST parsing

100%

100%

AST traversal

100%

100%

Arity calculation

0%

100%

Parameter type detection

100%

100%

Function name extraction

100%

100%

Summary statistics

100%

100%

100%

Function Wrapper Generator

Dynamic arity calculation for transformations

Criteria
Without context
With context

Uses getFunctionArity

100%

100%

Creates wrapper function

100%

100%

Preserves parameters

100%

100%

Generates arity check

100%

100%

Throws error correctly

100%

100%

Calls original function

100%

100%

100%

13%

AST Function Analyzer

Higher-order function composition

Criteria
Without context
With context

Import helper function

100%

100%

Use getFunctionArity directly

100%

100%

Pass function node

100%

100%

Handle arity result

80%

100%

Use @babel/types builders

100%

100%

Generate recursive curry

80%

100%

Respect parameter boundaries

30%

100%

100%

Function Parameter Analyzer

Parameter type analysis

Criteria
Without context
With context

Identifier detection

100%

100%

AssignmentPattern detection

100%

100%

RestElement detection

100%

100%

Pattern detection

100%

100%

Parameter iteration

100%

100%

100%

Function Arity Analyzer Plugin

Babel plugin integration

Criteria
Without context
With context

Import getFunctionArity

100%

100%

Babel plugin structure

100%

100%

Function node visiting

100%

100%

Call getFunctionArity

100%

100%

Add leading comment

100%

100%

Install with Tessl CLI

npx tessl i tessl/npm-babel--helper-get-function-arity
Evaluated
Agent
Codex

Table of Contents