Babel plugin that compiles ES2015 computed properties to ES5-compatible code
88
Build a Babel plugin that transforms objects with computed method properties into ES5-compatible code. Your plugin should handle object methods defined with computed property names (e.g., [methodName]() { ... }) and convert them appropriately for older JavaScript environments.
Your Babel plugin must transform object expressions that contain methods with computed property names. The transformation should:
@generates
/**
* Babel plugin that transforms computed method properties
* @returns {object} Babel plugin object with visitor methods
*/
function transformComputedMethods() {
// Implementation here
}
module.exports = transformComputedMethods;Provides the Babel transformation framework and AST node types.
Testing utilities for Babel plugins.
Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-transform-es2015-computed-propertiesdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10