
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@panzer1119/bbcode-parser
Advanced tools
An extensible BB code parser written in TypeScript that can be used both in the browser and Node.js.
<script src="bbCodeParser.min.js"></script>
...
var parser = new BBCodeParser(BBCodeParser.defaultTags());
var inputText = "[b]Bold text[/b]";
var generatedHtml = parser.parseString(inputText);
Node.js: npm install bbcode-parser
var BBCodeParser = require('bbcode-parser');
var parser = new BBCodeParser(BBCodeParser.defaultTags());
var html = parser.parseString('[b]Bold text[/b]');
BBTag constructor:
<br>) in the content.<tagName>content</tagName>.var bbTags = {};
//Simple tag. A simple tag means that the generated HTML will be <tagName>content</tagName>
bbTags["b"] = BBTag.createSimpleTag("b");
//Tag with a custom generator.
bbTags["img"] = BBTag.createSimpleTag("img", function (tag, content, attributes) {
return "<img src=\"" + content + "\" />";
});
//Tag with a custom generator + attributes
bbTags["url"] = BBTag.createSimpleTag("url", function (tag, content, attributes) {
var link = content;
if (attributes["site"] != undefined) {
link = escapeHTML(attributes["site"]);
}
if (!startsWith(link, "http://") && !startsWith(link, "https://")) {
link = "http://" + link;
}
return "<a href=\"" + link + "\" target=\"_blank\">" + content + "</a>";
});
//A tag that doesn't support nested tags. Useful when implementing code highlighting.
bbTags["code"] = new BBTag("code", true, false, true, function (tag, content, attributes) {
return "<code>" + content + "</code>";
});
var parser = new BBCodeParser(bbTags);
To run the build script you need:
FAQs
BB code parser written in TypeScript.
The npm package @panzer1119/bbcode-parser receives a total of 9 weekly downloads. As such, @panzer1119/bbcode-parser popularity was classified as not popular.
We found that @panzer1119/bbcode-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.