Skip to content
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

Support arrow functions without a block statement #421

Merged
merged 1 commit into from Jun 1, 2018

Conversation

@aengl
Copy link
Contributor

aengl commented May 17, 2018

#393 supports arrow functions, but will fail when using arrow functions without block statements, like the one mentioned by @julien-c in #389:

function: !!js/function >
  () => 'Wow! JS-YAML Rocks!';

Like @kivlor pointed out already, there's no constructor for ArrowFunction, so this is a bit of a workaround. Personally, I'd rather see this resolved with a safe-eval.

@puzrin

This comment has been minimized.

Copy link
Member

puzrin commented May 17, 2018

LGTM.

Kick me in a couple of days, i'll merge & publish if no more objections.

@aengl

This comment has been minimized.

Copy link
Contributor Author

aengl commented May 28, 2018

@puzrin Ping 😃

@puzrin puzrin merged commit 290705b into nodeca:master Jun 1, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk No dependency changes
Details
@puzrin

This comment has been minimized.

Copy link
Member

puzrin commented Jun 1, 2018

Sorry for silence. Published new version with your fixes. Thanks for efforts and patience!

@julien-c

This comment has been minimized.

Copy link

julien-c commented Jul 17, 2018

This is awesome, thank you

@aengl aengl deleted the aengl:aen/arrow branch Jul 18, 2018
@dvv

This comment has been minimized.

Copy link

dvv commented Nov 29, 2019

Converting ({ foo, bar}) => "baz" eats argument. Please consider to support the case. TIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.