
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.
poly-to-pslg
Advanced tools
Converts a polygon into a planar straight line graph.
var poly2pslg = require('poly-to-pslg')
var polygon = [
[[-2, 2], [2, 2], [2, -2], [-2,-2]],
[[-1, 1], [1, 1], [1, -1], [-1,-1]]
]
var pslg = poly2pslg(polygon)
console.log(pslg)
{ points:
[ [ -2, 2 ],
[ 2, 2 ],
[ 2, -2 ],
[ -2, -2 ],
[ -1, 1 ],
[ 1, 1 ],
[ 1, -1 ],
[ -1, -1 ] ],
edges:
[ [ 0, 1 ],
[ 1, 2 ],
[ 2, 3 ],
[ 3, 0 ],
[ 4, 5 ],
[ 5, 6 ],
[ 6, 7 ],
[ 7, 4 ] ] }
npm i poly-to-pslg
var graph = require('poly-to-pslg')(loops[, options])Converts a polygon into a planar straight line graph.
loops is an array of loops determining the vertices of the polygon. If only one loop is specified, this is inferred automatically.options is an object storing some optional parameters
options.clean if this flag is set to true, then clean up the resulting graph using clean-pslg. (Default true)options.nested if this flag is set to true, then assume the polygon is an array of loops. If false, then suppose that the polygon is just one array.Returns An object with two properties
points are the vertex coordinate of the pslgedges are the edges of the pslg(c) 2015 Mikola Lysenko. MIT License
FAQs
Convert a polygon into a planar straight line graph
We found that poly-to-pslg 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.