Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
line-simplify-rdp
Advanced tools
Simplify polylines and polygons using the Ramer–Douglas–Peucker algorithm.
array
⏏Return a simplified version of the polyline or polygon defined by the given points. Basically what happens is that some points are removed from the line, but only ones that leave the resulting line within a certain distance of the original.
Kind: Exported function
Returns: array
- the simplified points. (This will always be separately
allocated object, not the one passed in, but it will contain the
same point objects passed in.)
Param | Type | Description |
---|---|---|
points | array | polyline or polygon. Each element of the array must be an object with at least x and y numeric properties. Neither the array nor any member will be modified. |
threshold | number | maximum distance the simplified line can be from the original. Should be grater than or equal to zero. Passing zero means only colinear points will be eliminated; greater values lead to more aggressive line approximations. |
closed | boolean | if the passed first point and the last points are the same, this flag does nothing. Otherwise, if closed is true, the points will be treated as a polygon with an implied last segment between the last point and the first point. |
MIT
FAQs
Simplify lines using the Ramer–Douglas–Peucker algorithm
The npm package line-simplify-rdp receives a total of 145 weekly downloads. As such, line-simplify-rdp popularity was classified as not popular.
We found that line-simplify-rdp 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.