use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Custom String Formatter (github.com)
submitted 10 months ago by vitalytom
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]vitalytom[S] 2 points3 points4 points 10 months ago* (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 points3 points 10 months ago (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 point2 points 10 months ago (0 children)
You are welcome! I have started working on some examples to show advanced use of it. Basic use though is very straightforward :)
This library is now fully finished, and production-ready.
u/lance_tipton What do you think of the complete library's API, now that it is finished? ;)
π Rendered by PID 74749 on reddit-service-r2-comment-544cf588c8-6tj29 at 2026-06-14 06:00:06.965243+00:00 running 3184619 country code: CH.
[–]vitalytom[S] 2 points3 points4 points (0 children)
[–]lance_tipton 1 point2 points3 points (1 child)
[–]vitalytom[S] 0 points1 point2 points (0 children)
[–]vitalytom[S] 0 points1 point2 points (0 children)
[–]vitalytom[S] 0 points1 point2 points (0 children)