bbcode-parser is a JavaScript implementation of the lightweight markup language BBCode.
If you wish to convert BBCode to HTML or HTML to BBCode see bbcode-parser-template.
npm install @thoughtsunificator/bbcode-parser
import{Parser}from'@thoughtsunificator/bbcode-parser'constbbDocument=Parser.parse("[b]Hey, thanks![/b]")// return a BBDocument instanceconstbbElementbbDocument.documentElement.children[0]// Returns a bbElementconsttext=bbDocument.documentElement.children[0].textContent// returns "Hey, thanks!"