[ANN] melange-str: Str module for Melange

melange-str is an implementation of OCaml’s Str module for Melange, using JavaScript’s RegExp as the backend.

OCaml’s Str library provides regular expression matching, searching, replacement, and splitting. It’s part of the standard distribution and widely used. However, Str is implemented in C, which means it’s unavailable when compiling OCaml to JavaScript via Melange.

The module is exposed as Str (not Melange_str.Str), so existing code that opens or references Str works without changes.

Repository: GitHub - davesnx/melange-str: Str module for Melange · GitHub

Feedback, bug reports, and contributions are welcome. If you encounter any behavioral differences between native Str and melange-str, please open an issue or let me know!

Note: This package is brought by our lovely Open Source one-day-a-month at ahrefs.

4 Likes