New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shorthand properties examples #5334
Shorthand properties examples #5334
Conversation
The example output did not match the actual output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍
@@ -30,7 +30,7 @@ var cat = { | |||
|
|||
```js | |||
var cat = { | |||
getName: function () { | |||
getName: function getName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the current example is correct... the REPL currently only lets you select presets, and not individual plugins... the function is getting its name from transform-es2015-function-name
.
(p.s. we'd love for someone to help us augment the REPL to fix this!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you run Try on the plugin's page on the website. The preset es2015 is enable by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know but it seems weird to say that the output for this specific transform is what the preset outputs and not the plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I'll limit the change to just the missing space on line 16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me
The function name comes from the function name transform, not the shorthand property transform.
Thanks @bhoule! |
The shorthand properties example output did not match the actual output