New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

line-simplify-rdp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

line-simplify-rdp - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json
{
"name": "line-simplify-rdp",
"version": "0.3.0",
"version": "0.3.1",
"description": "Simplify lines using the Ramer–Douglas–Peucker algorithm",

@@ -5,0 +5,0 @@ "repository": "https://github.com/scottglz/line-simplify-rdp",

@@ -37,2 +37,17 @@ 'use strict';

t.deepEquals(simplify(points, 1), points);
});
function expandPts(pts) {
var ret = [];
for (var i=0; i < pts.length; i += 2) {
ret.push({x: pts[i], y: pts[i+1]});
}
return ret;
}
test("redundant square", function(t) {
t.plan(1);
var points = expandPts([0,0, 0,1, 0,2, 0,3, 1,3, 2,3, 3,3, 3,2, 3,1, 3,0, 2,0, 1,0, 0,0]);
t.deepEquals(simplify(points, 0), expandPts([0,0, 0,3, 3,3, 3,0, 0,0]));
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc