
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
html-parse-string
Advanced tools
HTML parse and stringify utils
npm install html-parse-string
basic data structure
export interface IDom {
type: string;
content ? : string;
voidElement: boolean;
name: string;
attrs: { [key: string]: any };
children: IDom[];
}
parse html to idom array
const { parse, stringify } = require('html-parse-string');
const t = `<div>this is div</div>`;
console.log(parse(t));
get idom array
[
{
type: "tag",
name: "div",
voidElement: false,
attrs: {},
children: [
{
type: "text",
content: "this is div",
},
],
},
];
stringify idom array to html
const { parse, stringify } = require('html-parse-string');
const t = `<div>this is div</div>`;
const ast = parse(t);
console.log(stringify(ast));
get html string
<div>this is div</div>
FAQs
Utils for parsing and stringify html strings
The npm package html-parse-string receives a total of 14,361 weekly downloads. As such, html-parse-string popularity was classified as popular.
We found that html-parse-string 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.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.