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

@opentripplanner/humanize-distance

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentripplanner/humanize-distance - npm Package Compare versions

Comparing version 0.0.22 to 1.0.0

lib/index.d.ts

8

lib/index.js

@@ -17,8 +17,7 @@ "use strict";

function humanizeDistanceStringMetric(meters) {
let km = meters / 1000;
const km = meters / 1000;
if (km > 100) {
// 100 km => 999999999 km
km = km.toFixed(0);
return `${km} km`;
return `${km.toFixed(0)} km`;
}

@@ -28,4 +27,3 @@

// 1.1 km => 99.9 km
km = km.toFixed(1);
return `${km} km`;
return `${km.toFixed(1)} km`;
} // 1m => 999m

@@ -32,0 +30,0 @@

{
"name": "@opentripplanner/humanize-distance",
"version": "0.0.22",
"version": "1.0.0",
"description": "Pretty print a string for a certain distance",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": "https://github.com/opentripplanner/otp-ui.git",

@@ -10,3 +11,6 @@ "author": "Evan Siroky",

"private": false,
"gitHead": "9ee3a7184fffb2401e9ccc0930b743ae028a1b0f"
"gitHead": "644c72e0d08f8daf93b44eaf0deec88a1e16f414",
"scripts": {
"tsc": "tsc"
}
}
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