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
Create a configuration optimization tool that analyzes modern JavaScript code and generates optimized build configurations with appropriate compilation assumptions.
@generates
/**
* Analyzes source code and generates an optimized build configuration
* with appropriate assumptions for the given target environments.
*
* @param {string} sourceFile - Path to the source file to analyze
* @param {string[]} targets - Array of target browser/environment strings (e.g., ['chrome 90', 'firefox 88'])
* @returns {Object} Configuration object with assumptions and targets
*/
function generateOptimizedConfig(sourceFile, targets) {
// IMPLEMENTATION HERE
}
/**
* Analyzes source code and provides a detailed optimization report
* including recommended assumptions and their impact.
*
* @param {string} sourceFile - Path to the source file to analyze
* @param {string[]} targets - Array of target browser/environment strings
* @returns {Object} Report object with config, reasoning, and size estimates
*/
function analyzeAndReport(sourceFile, targets) {
// IMPLEMENTATION HERE
}
module.exports = {
generateOptimizedConfig,
analyzeAndReport
};Provides the core transformation and configuration functionality.
Provides JavaScript parsing capabilities for code analysis.
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10