
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
2d-spiral functions. Includes archimedean and logarithmic generic spirals. Useful to draw spiral paths in canvas, svg etc.
var spiral = require('spiral-2d/logarithmic');
//paint spiral curve in canvas
context.beginPath();
var center = [50, 50];
context.moveTo(center[0], center[1]);
for (var angle = 0; angle <= Math.PI * 4; angle+=0.01) {
var coords = spiral(center, angle);
context.lineTo(coords[0], coords[1]);
}
context.stroke();
//fill spiral sector
context.beginPath();
var center = [center[0], center[1]];
context.moveTo(spiral(center, Math.PI * 2));
for (var angle = Math.PI * 2; angle <= Math.PI * 3; angle+=0.01) {
var coords = spiral(center, angle);
context.lineTo(coords[0], coords[1]);
}
context.lineTo(spiral(center, Math.PI * 5));
for (var angle = Math.PI * 5; angle >= Math.PI * 4; angle-=0.01) {
var coords = spiral(center, angle);
context.lineTo(coords[0], coords[1]);
}
context.lineTo(spiral(center, Math.PI * 2));
context.fill();
//include the whole module (logarithmic spiral by default)
var spiral = require('spiral-2d');
//or include just part
var archimedean = require('spiral-2d/archimedean');
var logarithmic = require('spiral-2d/logarithmic');
//get coordinates of a spiral point for passed params
logarithmic(centerXY, angleInRadians, a, b);
archimedean(centerXY, angleInRadians, a, b, c?);
//get radius of spiral params
logarithmic.radius(angleInRadians, a, b);
archimedean.radius(angleInRadians, a, b, c?);
//get angle of spiral params
logarithmic.angle(radius, a, b);
archimedean.angle(radius, a, b, c?);
//get a/b properies of spirals (to adjust size etc)
logarithmic.a(radius, angle, b);
archimedean.a(radius, angle, b, c?);
logarithmic.b(radius, angle, a);
archimedean.b(radius, angle, a, c?);
Most of spirals fall into one of two kinds of generic spirals:
//Golden, or fibonacci spiral https://en.wikipedia.org/wiki/Golden_spiral
logarithmic(center, angle, a, 0.3063489);
//Hyperbolic spiral https://en.wikipedia.org/wiki/Hyperbolic_spiral
archimedean(center, angle, 0, a, -1);
//Fermat’s spiral https://en.wikipedia.org/wiki/Fermat%27s_spiral
archimedean(center, angle, 0, 1, 2);
//Lituus https://en.wikipedia.org/wiki/Lituus_(mathematics)
archimedean(center, angle, 0, 1, -2);
FAQs
Archimedean/logarithmic spiral functions
We found that spiral-2d 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
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.