Babel plugin that transforms ECMAScript object rest and spread syntax into ES5-compatible code.
85
Quality
Pending
Does it follow best practices?
Impact
85%
1.06xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
A utility that analyzes JavaScript code files to identify and report on unused function declarations and function expressions.
"function foo() {} function bar() {} foo();", it identifies that bar is declared but never called @test"function outer() { function inner() {} } outer();", it identifies that inner is declared but never used @test"const add = function() {}; const sub = function() {}; add();", it identifies that sub is assigned but never called @test"function greet() {} greet(); greet();", it returns an empty array since greet is used @test"foo(); bar();", it returns an empty array @test@generates
/**
* Analyzes JavaScript code to find unused functions.
*
* @param {string} code - The JavaScript code to analyze
* @returns {Array<{name: string, line: number, type: string}>} Array of unused functions,
* where each object contains the function name, line number, and type ('declaration' or 'expression')
* @throws {Error} If the code cannot be parsed
*/
function findUnusedFunctions(code) {
// IMPLEMENTATION HERE
}
module.exports = { findUnusedFunctions };Provides JavaScript parsing capabilities to convert source code into an Abstract Syntax Tree (AST).
Provides AST traversal capabilities to visit and analyze nodes in the syntax tree.
Provides utilities for checking AST node types and working with AST nodes.
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10