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

Provide sync API #77

Open
jverce opened this issue Jul 29, 2019 · 2 comments
Open

Provide sync API #77

jverce opened this issue Jul 29, 2019 · 2 comments

Comments

@jverce
Copy link

jverce commented Jul 29, 2019

Since it's a straightforward change (as far as I can tell), I'd like to work on providing an alternative synchronous API for this lib.

This would mean keeping the async API as-is:

  • transform
  • toJson
  • prettyPrint

The new API would provide the new sync functions:

  • transformSync
  • toJsonSync
  • prettyPrintSync

My proposal will most probably involve refactoring the async calls so that they return a Promise that wraps up a call to their corresponding sync alternative (since that's what's done currently). This change should be backwards compatible.

@tuananh
Copy link
Owner

tuananh commented Jul 30, 2019

I've been meaning to do that but the priority shifted. my current work has no need for xml transformation anymore.

If you want to work on that, you're more than welcome :)

@tuananh
Copy link
Owner

tuananh commented Jul 30, 2019

also: toJson is not yet implemented :D, i shouldn't have put it there since it's not done

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

No branches or pull requests

2 participants