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

Add sync API #2

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Add sync API #2

merged 1 commit into from
Apr 24, 2020

Conversation

aduh95
Copy link
Owner

@aduh95 aduh95 commented Apr 9, 2020

Adds a sync version of the renderString method:

const vizRenderStringSync = require("@aduh95/viz.js/sync");
console.log(vizRenderStringSync("digraph{1 -> 2 }"));

Key differences with async API:

  • It uses asm.js instead of WebAssembly, this should come with a performance
    hit and a bigger bundled file size.
  • It is a CommonJS module, while the rest of the API is written as standard
    ECMAScript modules. The upside is this syntax is supported on a wider Node.js
    version array.

Fixes #1

@aduh95 aduh95 force-pushed the master branch 7 times, most recently from f6385b9 to 3890d89 Compare April 15, 2020 19:27
@aduh95 aduh95 force-pushed the sync-api branch 2 times, most recently from 3ac2e8e to fcd5b40 Compare April 15, 2020 19:44
@aduh95 aduh95 force-pushed the master branch 2 times, most recently from 73d2d94 to f07ce08 Compare April 16, 2020 11:57
@aduh95 aduh95 merged commit cee9196 into master Apr 24, 2020
@aduh95 aduh95 deleted the sync-api branch April 24, 2020 15:01
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

Successfully merging this pull request may close these issues.

[Feature request] Synchronous API
1 participant