Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
hast is an HTML processor powered by plugins. Lots of bla. Bla and Bla. 100% coverbla.
hast is not (yet) fit for human consumption.
Just like what retext did for natural language and mdast for markdown, now comes HTML.
npm:
npm install wooorm/hast
Parse an HTML document, apply plugins to it, and compile it.
Signatures
doc = hast().process(value, options?, done?)
.
done
(function(Error?, File?, string?)
) — Callback invoked when the
is generated with either an error, or a result. Only strictly needed when
async plugins are used.
Returns
string
or null
: A document. The result is null
if a plugin is
asynchronous, in which case the callback done
should’ve been passed (don’t
worry: plugin creators make sure you know it’s async).
Change the way hast
works by using a plugin
.
Signatures
processor = hast.use(plugin, options?)
;processor = hast.use(plugins)
.Parameters
plugin
(Function
) — A Plugin;plugins
(Array.<Function>
) — A list of Plugins;options
(Object?
) — Passed to plugin. Specified by its documentation.Returns
Object
: an instance of HAST: The returned object functions just like
hast, but caches the use
d plugins. This provides the ability to chain
use
calls to use multiple plugins, but ensures the functioning of the
hast module does not change for other dependents.
hast exposes the processed document using unist nodes and files (so there are already tools for working with the syntax tree).
interface Node {
type: string;
data: Data | null;
}
interface Data { }
interface Properties { }
interface Parent <: Node {
children: [];
}
interface Element <: Parent {
type: "element";
tagName: string;
properties: Properties;
children: [];
}
interface Root <: Parent {
type: "root";
}
interface Directive <: Node {
type: "directive";
value: string;
}
interface Comment <: Node {
type: "comment";
value: string;
}
interface CharacterData <: Node {
type: "characterData";
value: string;
}
interface Text <: Node {
type: "text";
value: string;
}
FAQs
Renamed to rehype
The npm package hast receives a total of 23,028 weekly downloads. As such, hast popularity was classified as popular.
We found that hast 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.