swc_ecma_compat_es3

Function member_expression_literals

source
pub fn member_expression_literals() -> impl Pass
Expand description

babel: transform-member-expression-literals

§Input

obj["foo"] = "isValid";

obj.const = "isKeyword";
obj["var"] = "isKeyword";

§Output

obj.foo = "isValid";

obj["const"] = "isKeyword";
obj["var"] = "isKeyword";