
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
configurable-tree-traversal
Advanced tools
Can do depth-first traversals like on this picture for abstract trees.
(source: https://en.wikipedia.org/wiki/Tree_traversal)
To run examples you'll need to have node and you'll need to run npm install
.
npm run tsfile examples/tree-from-image-example.ts
const treeData =
{
$d: 'F', $c: [
{
$d: 'B', $c: [
{ $d: 'A', $c: [] },
{
$d: 'D', $c: [
{ $d: 'C', $c: [] },
{ $d: 'E', $c: [] }]
}]
},
{
$d: 'G', $c: [
null,
{
$d: 'I', $c: [
{ $d: 'H', $c: [] }]
}]
}]
};
const traversal = new DepthFirstTraversal({
traversableTree: {
makeRoot: () => treeData,
makeVertex: (childHint: any) => childHint
}
});
traversal.addVisitorFor(DepthFirstTraversalOrder.PRE_ORDER, (vertex) => reportVisit(DepthFirstTraversalOrder.PRE_ORDER, vertex.getData()));
traversal.addVisitorFor(DepthFirstTraversalOrder.IN_ORDER, (vertex) => reportVisit(DepthFirstTraversalOrder.IN_ORDER, vertex.getData()));
traversal.addVisitorFor(DepthFirstTraversalOrder.POST_ORDER, (vertex) => reportVisit(DepthFirstTraversalOrder.POST_ORDER, vertex.getData()));
traversal.makeRunner().run();
Stdout
npm run tsfile examples/traversable-object-example.ts
npm run tsfile examples/traversable-object-example-disable-subtree-traversal.ts
Same as traversable-object-example.ts, but uses DISABLE_SUBTREE_TRAVERSAL
command on vertex B
.
npm run tsfile examples/traversable-object-example-rewrite-vertex-hints.ts
Same as traversable-object-example.ts, but
uses REWRITE_VERTEX_HINTS_ON_PRE_ORDER
command on vertex E
.
npm run tsfile examples/traversable-object-iterable-example.ts
npm run tsfile examples/rewrite-object-example.ts
Not tested beyond examples given and never yet applied to real-life problems.
If for some reason you want to use this as a dependency, please use fixed version (remove ^ from version
of configurable-tree-traversal
in package.json)
FAQs
Very configurable tree traversal for TypeScript
The npm package configurable-tree-traversal receives a total of 21 weekly downloads. As such, configurable-tree-traversal popularity was classified as not popular.
We found that configurable-tree-traversal 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.