Format strings in BBCode like Steam-Workshop and Community (See https://steamcommunity.com/comment/Announcement/formattinghelp)
Use npm
for installation:
npm install steam-formatting
Require the module with following line:
const formatter = require('steam-formatting');
After initialisation, you can:
var parsed = formatter.format('[b]Hello World[/b]! Click the [url=http://google.com/]Link[/url]');
See Wiki for detailed informations!