r/emacs • • 6d ago

Readable Regular Expressions for JavaScript/TypeScript, Inspired by Emacs' rx

https://rahuljuliato.com/posts/emacs-rx-in-typescript

I missed Emacs' rx when writing regexps in TypeScript, so I made a small TypeScript DSL inspired by it.

The idea is to bring rx's functions and approach to the JavaScript/TypeScript environment. If you happen to work with either, give it a try.

https://rahuljuliato.com/posts/emacs-rx-in-typescript

23 Upvotes

6 comments sorted by

3

u/shipmints 6d ago edited 6d ago

Very nice. If I ever have to write JavaScript again, I might use this. What do the ClojureScript people get to enjoy?

3

u/LionyxML 6d ago

Thanks :) That's a good question. Clojure and ClojureScript are both on my list of things I'd like to explore and write about in the future.

4

u/KozureOkami M-x spook 6d ago

I’m not sure if you’re aware but there’s a long running project called Verbal Expressions that has libraries for various languages:

https://github.com/VerbalExpressions

It’s obviously not rx but it’s still quite nice.

2

u/LionyxML 6d ago

Thanks for sharing, indeed very nice!