
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
A node library for parsing HTML into vdom of your choice.
Differences from html-virtualize:
> npm install 2vdom
pragma
: jsx-compatible pragma function, e.g. React.createElementhtml
: html to parse. May be an ordinary js string or Node.js BufferPromise
that resolves to the parsed tree.let parse = require('2vdom');
let html = "<html>...</html>";
let pragma = React.createElement || deku.element || <some jsx pragma fn>;
let vdom = parse(pragma, html);
// Buffer works too:
parse(pragma, fs.readFileSync('<filename>'))
let pragma = (tagname, attrs, ...children) =>
h(tagname, attrs, children);
// carry on as usual ...
let vdom = parse(pragma, html);
let fileStream = fs.createReadStream('<filename>');
parse.stream(pragma, fileStream)
.then(function(vdom) {
// your code here ...
});
There's a number of limitations of 2vdom that should not affect normal usage. However, if you encounter them in any actual use case or if you have good ideas for overcoming them, please issue or PR.
<!doctype>
Again,
because there's no way of conveying these to pragma functions.<html>
) at document root. If you have
multiple ones, 2vdom throws away every one but the last element. This is not
a technical limitation, so let me know if you need this feature.> jasmine
2-Clause BSD
FAQs
Framework-agnostic library for parsing HTML into vdom of your choice
The npm package 2vdom receives a total of 36 weekly downloads. As such, 2vdom popularity was classified as not popular.
We found that 2vdom 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.