Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix syntax error in transformer example #195

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Fix syntax error in transformer example #195

merged 1 commit into from
Dec 4, 2019

Conversation

chocolateboy
Copy link
Contributor

No description provided.

@ezolenko
Copy link
Owner

ezolenko commented Dec 3, 2019

This is valid syntax either way?

@chocolateboy
Copy link
Contributor Author

It's not. Try it:

$ cat temp.js

const transformer = (service) =>
{
     before: [ keysTransformer(service.getProgram()) ],
     after: []
};

$ node temp.js

temp.js:4
     after: []
          ^
SyntaxError: Unexpected token ':'

@ezolenko
Copy link
Owner

ezolenko commented Dec 4, 2019

Ah, it's a function returning object literal. Missed that part, thanks.

@ezolenko ezolenko merged commit 947da25 into ezolenko:master Dec 4, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants