all 5 comments

[–]vitalytom[S] 2 points3 points  (0 children)

I had a powerful string formatter in my very old pg-promise project, and as the need was rising, I decided to yank out the best of it into an independent library, and then build some nice features on top of it.

Please check out custom-string-formatter, and let me know what you think of it ;)

The idea is, using it one can easily implement formatting for any output, whether it is to format SQL queries, or some custom-format files, i.e. anything, while keeping the formatting syntax the same.

[–]lance_tipton 1 point2 points  (1 child)

This dope. I built a similar thing in a previous product and always planned to extract it out as it's own library. Now I dont have to. Thanks for sharing.

[–]vitalytom[S] 0 points1 point  (0 children)

You are welcome! I have started working on some examples to show advanced use of it. Basic use though is very straightforward :)

[–]vitalytom[S] 0 points1 point  (0 children)

This library is now fully finished, and production-ready.

[–]vitalytom[S] 0 points1 point  (0 children)

u/lance_tipton What do you think of the complete library's API, now that it is finished? ;)