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

furkot-driving-log

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

furkot-driving-log - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

History.md

25

lib/driving-log.js

@@ -8,2 +8,7 @@ var buffer = require('./buffer');

var zero = {
distance: 0,
driving: 0
};
function write(out, line) {

@@ -52,9 +57,9 @@ line = line.map(function(item) {

'Notes'
];
],
mode = options.metadata && options.metadata.mode;
write(out, header);
options.routes[0].points.forEach(function (step, i, steps) {
var line = [], next = steps[i + 1];
var line = [], next = steps[i + 1], travel;
if (!next) {

@@ -69,4 +74,10 @@ return;

totals.driving += next.driving;
totals.distance += next.distance;
if (mode === next.mode || next.mode === undefined) {
travel = next;
}
else {
travel = zero;
}
totals.driving += travel.driving;
totals.distance += travel.distance;

@@ -81,4 +92,4 @@ line.push(step.name);

line.push(format.time(next.arrival_time));
line.push(format.duration(next.driving));
line.push(format.distance(next.distance, 1, distanceUnit));
line.push(format.duration(travel.driving));
line.push(format.distance(travel.distance, 1, distanceUnit));
line.push(format.duration(totals.driving));

@@ -85,0 +96,0 @@ line.push(format.distance(totals.distance, 1, distanceUnit));

{
"name": "furkot-driving-log",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generate CSV driving log from Furkot trip data.",

@@ -5,0 +5,0 @@ "homepage": "https://trips.furkot.com",

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