Hyphenation for node and Polyfill for client-side hyphenation.
While the .wasm files are already compact by design, the .js files are not minified. I highly recommend using one of the es6-capable JavaScript minifier tools.
If you installed Hyphenopoly with npm run npm run prepare
to create a directory called min
that contains a full set of minified files (and the test suite) minified with terser
.
All files have good compression rates when using gzip, deflate, and the like. You may need to configure your server to be able to compress .wasm
-files though!
Hyphenopoly_Loader.js and Hyphenopoly.js are optimized for usage in browsers. For usage as a module, see: node module
Let me know, if you have a use case for hyphenation in node.js
Source code
).Hyphenopoly_Loader.js
Hyphenopoly.js
patterns/
(Of course, you can delete the patterns for the language you won’t need.)
npm i hyphenopoly
in your project folder