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.
affineplane-circlepack
Advanced tools
Fast order-preserving circle packing algorithm for data visualization
Deterministic and order-preserving 2D circle packing algorithm for data visualization.
$ npm install affineplane-circlepack
$ yarn add affineplane-circlepack
The basic usage is simple:
const pack = require('affineplane-circlepack')
const circles = [
{ x: 1, y: 0, r: 1 },
{ x: 2, y: 4, r: 2 },
{ x: 1, y: 5, r: 2 },
...
]
const packed = pack(circles)
// packed is an array that contains the same circles with x and y adjusted.
Asynchronic runs are good for packing large sets of circles in a non-blocking way:
pack(circles, (batch) => {
console.log('A batch of packed circles fresh out of the oven.', batch)
}, () => {
console.log('All packed.')
})
Pull requests and bug reports are highly appreciated. Please test your contribution with the following scripts:
Run test suite:
$ npm run test
Run only linter:
$ npm run lint
This library uses some tools from affineplane geometry library.
FAQs
Fast order-preserving circle packing algorithm for data visualization
We found that affineplane-circlepack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.