Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

polyline-encoded

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polyline-encoded - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

bower.json
{
"name": "Leaflet.encoded",
"version": "0.0.6",
"version": "0.0.7",
"homepage": "https://github.com/jieter/Leaflet.encoded",

@@ -5,0 +5,0 @@ "authors": [

{
"name": "polyline-encoded",
"version": "0.0.6",
"version": "0.0.7",
"description": "Encoding and decoding of Google's polyline encoding format",

@@ -5,0 +5,0 @@ "main": "Polyline.encoded.js",

@@ -100,3 +100,3 @@ /*

for (var d = 0; d < options.dimension; ++d, ++i) {
numbers[i] = lastNumbers[d] = numbers[i] + (lastNumbers[d] || 0);
numbers[i] = Math.round((lastNumbers[d] = numbers[i] + (lastNumbers[d] || 0)) * options.factor) / options.factor;
}

@@ -103,0 +103,0 @@ }

@@ -11,3 +11,3 @@ 'use strict';

describe('PolyUtil', function () {
var latlngs, encoded, encoded6, delta;
var latlngs, encoded, encoded6, encoded5, delta;

@@ -28,2 +28,3 @@ var floats, smallFloats, encodedFloats;

encoded = '_p~iF~cn~U_ulLn{vA_mqNvxq`@';
encoded5 = 'ehukEveaqO|D~Laf@YiZw[oOgQqGeIqE_GeXu_@aOiKkCkMbGrDxIzF`Ct@~@L`FYhAMrNoFfEoArIwBvGwBvB}@jHcBnFcBz@g@jMsDzJ_DfEoAf@SRjCrDbQbBg@vB{@jCoArDg@bBfE|CvKtIbWrDrNvBnAvGfEvBjGqNzNcMtDgN`I_LpM';
encoded6 = '_izlhA~pvydF_{geC~{mZ_kwzCn`{nI';

@@ -86,2 +87,7 @@

it('should respect the precision in the decoded coordinates', function () {
var decoded = polyUtil.decode(encoded5, 5);
decoded[0].should.eql(decoded[decoded.length - 1]);
});
it('integers with dimension = 1', function () {

@@ -88,0 +94,0 @@ polyUtil.decodeUnsignedIntegers(encodedUnsignedIntegers)

Sorry, the diff of this file is not supported yet

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