Skip to content

Provide sync API #77

@jverce

Description

@jverce

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions