Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
holy-quad-tree
Advanced tools
This project was inspired by Timohausmann's "quadtree-js" and how slow it was
This library is extremely optimized to the point of being able to handle millions of inserts and retrieves in less than a second
A lot of the QuadTree's I found were so unbearably slow that I had to make my own
...
And one of my friends made a QuadTree in C++ that was (legit) 10x slower
So just to flex I'm making this public
Please look at the source for details, or just look below for examples
const QuadTree = require("holy-quad-tree");
const qt = new QuadTree.QuadTree(
new QuadTree.Bound(100, 100), // Width, height
10, // Max objects before splitting
100 // Max depth
); // Please look at the source for more details/comments
// Make everything
const Node1 = new QuadTree.Node(
10, // X
10, // Y
20, // Width
20, // Height
"Test1" // Identifier
);
const Node2 = new QuadTree.Node(
10, // X
10, // Y
20, // Width
20, // Height
"Test2" // Identifier
);
// Insert everything thing
qt.insert(Node1);
qt.insert(Node2);
// Retrieve what we have
qt.retrieve(
new QuadTree.Node(
5, // X
5, // Y
30, // Width
30 // Height
) // Search area
); // Returns: [Node] x2
// Lets remove an object (Second one)
qt.removeObject(Node2);
// Lets try retrieving again
qt.retrieve(
new QuadTree.Node(
5, // X
5, // Y
30, // Width
30 // Height
) // Search area
); // Returns: [Node] x1
// 2nd object was removed!
qt.clear(); // Deallocate everything
FAQs
Optimized QuadTree made by Sopur
The npm package holy-quad-tree receives a total of 1 weekly downloads. As such, holy-quad-tree popularity was classified as not popular.
We found that holy-quad-tree 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
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.