Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
async-rtree
Advanced tools
An async RTree, suitable for use with levelup, based on rbush. Constructor takes an argument 'store', which is a leveldb style datastore with get, put, del, and batch methods.
Internally, it is dimensionally agnostic and all bboxen are expressed in terms of [[min1, ...], [max1, ...]]
e.g. [[west, south], [east, north]]
or [[xmin, ymin, zmin], [xmax, ymax, zmax]]
. Just be consistent in your dimensions. You can generate these from geojson with gbv.
Currently features the following methods
rtree.insert('id', bbox, callback);
rtree.append('id', bbox, callback);
rtree.remove('id', callback);
rtree.remove('id', bbox, callback);
rtree.query(bbox);// returns stream
rtree.query(bbox, cb);// array
rtree.bulk(array, cb);// array members of of the form {id:id, bbox:bbox}
All the rtree stores is the id and bbox, any other data you want to store you need to store elsewhere.
The difference between insert and append is that insert will delete anything with the id currently in the database while append doesn't care if there is one already in there.
A bbox is optional when using remove, if it's ommited then the bboxen are looked up, if a bbox is provided it must be exact, the only reason you'd want to do that is if you have multiple nodes with the same id and only want to remove 1.
FAQs
an async rtree suitable for use with leveldb
The npm package async-rtree receives a total of 21 weekly downloads. As such, async-rtree popularity was classified as not popular.
We found that async-rtree 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.