Ah, thanks. There is already a JavaScript port of JTS called JSTS and they implemented some Java collection types in JavaScript. It might take some more work to convert the uses of them to new platform-agnostic synonyms, but the Java-to-Kotlin converter might help here.