Socket
Socket
Sign inDemoInstall

altpro

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

altpro - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

21

lib/altpro.js

@@ -244,10 +244,15 @@ const findSegment = require('./find-segment');

function calcElevation(elevation) {
if (elevation === undefined) {
return;
}
if (unit === 'ft') {
elevation *= 3.28084;
}
return Math.round(elevation);
}
function displayLabel({ elevation }) {
if (elevation !== undefined) {
if (unit === 'ft') {
elevation *= 3.28084;
}
elevation = Math.round(elevation);
}
else {
elevation = calcElevation(elevation);
if (elevation === undefined) {
elevation = '';

@@ -263,3 +268,3 @@ }

distance,
elevation,
elevation: calcElevation(elevation),
index

@@ -266,0 +271,0 @@ };

{
"name": "altpro",
"version": "1.0.1",
"version": "1.0.2",
"description": "Elevation profile widget.",

@@ -21,8 +21,8 @@ "author": {

"devDependencies": {
"browserify": "~16",
"browserify": "~17",
"canvas": "~2",
"jsdom": "~13",
"jsdom": "~18",
"jsdom-global": "~3",
"jshint": "~2",
"mocha": "~5",
"mocha": "~9",
"should": "~13"

@@ -29,0 +29,0 @@ },

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Dependency Status][deps-image]][deps-url]
[![Dev Dependency Status][deps-dev-image]][deps-dev-url]

@@ -71,7 +69,1 @@ # altpro

[travis-image]: https://img.shields.io/travis/com/pirxpilot/altpro.svg
[deps-image]: https://img.shields.io/david/pirxpilot/altpro.svg
[deps-url]: https://david-dm.org/pirxpilot/altpro
[deps-dev-image]: https://img.shields.io/david/dev/pirxpilot/altpro.svg
[deps-dev-url]: https://david-dm.org/pirxpilot/altpro?type=dev
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