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
Build a JavaScript module that transforms modern ES6+ code and JSX syntax to ES5-compatible JavaScript that can run in older browsers.
@generates
/**
* Transforms modern JavaScript/JSX code to browser-compatible JavaScript.
*
* @param {string} code - The source code to transform
* @param {Object} options - Transformation options
* @param {string[]} options.presets - Array of preset names to use (e.g., ['env', 'react'])
* @returns {Object} Result object containing either transformed code or error details
* @returns {string} result.code - The transformed code (if successful)
* @returns {Error} result.error - Error object with message and location (if failed)
*/
function transform(code, options) {
// IMPLEMENTATION HERE
}
module.exports = { transform };Provides browser-based JavaScript transformation capabilities.
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10