browsermt / bergamot-translator

Cross platform C++ library focusing on optimized machine translation on the consumer-grade device.
http://browser.mt
Mozilla Public License 2.0
327 stars 36 forks source link

Expand the node-test.js example code with documentation #434

Closed jelmervdl closed 1 year ago

jelmervdl commented 2 years ago

This looked like the easiest way to provide some documentation & examples for the WASM API.

I've upgraded to node 18 because that allows us to use fetch() which matches what you would use in the browser.

Every line of code is annotated with some documentation on why it is there and what you can do with it.

XapaJIaMnu commented 1 year ago

What about this one @jelmervdl

jelmervdl commented 1 year ago

We can merge this as well. It works as documentation for the lower level API (the one exposed directly by the WASM interop code).