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 for ES6 in js/function YAML type #389

Closed
julien-c opened this issue Dec 27, 2017 · 3 comments
Closed

Support for ES6 in js/function YAML type #389

julien-c opened this issue Dec 27, 2017 · 3 comments

Comments

@julien-c
Copy link

function: !!js/function >
  () => 'Wow! JS-YAML Rocks!';
@puzrin
Copy link
Member

puzrin commented Dec 28, 2017

Looks reasonable. PR will be accepted.

kivlor added a commit to kivlor/js-yaml that referenced this issue Jan 24, 2018
@kivlor
Copy link
Contributor

kivlor commented Jan 24, 2018

I've had a crack at adding support for ES6 arrow functions, see - #393

For the moment, dumped arrow functions are just 'standard' functions. JS doesn't seem to have an ArrowFunction class so I couldn't see a way to dynamically create them.

I could use eval? (joking, not joking...)

@puzrin puzrin closed this as completed in c62fd62 Feb 15, 2018
minj added a commit to minj/js-yaml that referenced this issue Apr 28, 2018
* master: (58 commits)
  Check for leading newlines when determining if block indentation indicator is needed (nodeca#404)
  Add property based tests to assess load reverses dump (nodeca#398)
  3.11.0 released
  Browser files rebuild
  Dumper: fix negative integers in bin/octal/hex formats, close nodeca#399
  support es6 arrow functions, fixes nodeca#389 (nodeca#393)
  Fix typo in README.md (nodeca#373)
  3.10.0 released
  Browser files rebuild
  Add test for astrals dump
  Combine surrogate pairs into one escape sequence when encoding. (nodeca#369)
  Fix condenseFlow for objects (nodeca#371)
  correct spelling mistake (nodeca#367)
  More meaningful error for loader (nodeca#361)
  Fix typo and format code. (nodeca#365)
  3.9.1 released
  Browser files rebuild
  Ensure stack is present for custom errors (fixes nodeca#351) (nodeca#360)
  3.9.0 released
  Browser files rebuild
  ...
@aengl
Copy link
Contributor

aengl commented May 17, 2018

I tried to support arrow functions without block statements, feedback welcome: #421

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

No branches or pull requests

4 participants