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

furkot-directions

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

furkot-directions - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

lib/service/osrm/index.js

6

History.md
0.0.7 / 2017-01-04
==================
* OSMR as a main routing engine for driving
* replace superagent with fetchagent
0.0.6 / 2016-12-27

@@ -3,0 +9,0 @@ ==================

var _defaults = require('lodash.defaults');
var strategy = require('./strategy');
var travelMode = require('./model').travelMode;
var util = require('./service/util');

@@ -17,2 +18,8 @@

var services = [{
service: require('./service/osrm'),
skip: function (options, query, result) {
// or asking for walking or biking directions (OSRM doesn't do it well)
return skip(options, query, result) || (query.mode !== travelMode.car && query.mode !== travelMode.motorcycle);
}
}, {
name: 'mapzen',

@@ -19,0 +26,0 @@ service: require('./service/mapzen'),

14

lib/model.js

@@ -9,5 +9,14 @@ // path simplification constants

// travel mode constants
var travelMode = {
motorcycle: -1,
car: 0,
bicycle: 1,
walk: 2,
other: 3
};
// template for directions query object
var directionsQuery = [{ // array of legs each for consecutive series of points
mode: 0, // numeric value of travel mode: -1 - motorcycle, 0 - car, 1 - bicycle, 2 - walk, 3 - other
mode: travelMode.car, // numeric value of travel mode
avoidHighways: false, // true to avoid highways

@@ -49,3 +58,4 @@ avoidTolls: false, // true to avoid toll roads

directionsResult: directionsResult,
pathType: pathType
pathType: pathType,
travelMode: travelMode
};

6

lib/service/index.js
var _defaults = require('lodash.defaults');
var pathType = require("../model").pathType;
var series = require('run-series');
var superagent = require('superagent');
var fetchagent = require('fetchagent');
var status = require('./status');

@@ -21,6 +21,6 @@ var util = require('./util');

function request(url, req, fn) {
return superagent
return fetchagent
.get(url)
.query(req)
.accept('application/json')
.set('accept', 'application/json')
.end(fn);

@@ -27,0 +27,0 @@ }

{
"name": "furkot-directions",
"version": "0.0.6",
"version": "0.0.7",
"description": "Directions service for Furkot",

@@ -20,2 +20,3 @@ "author": {

"code42day-vis-why": "^1.1.4",
"fetchagent": "^1.0.0",
"geodesy": "^1.1.1",

@@ -25,4 +26,3 @@ "limiter-component": "^0.2.1",

"run-series": "^1.1.4",
"run-waterfall": "^1.1.3",
"superagent": "~2"
"run-waterfall": "^1.1.3"
},

@@ -34,3 +34,4 @@ "devDependencies": {

"mocha": "^3.2.0",
"should": "^11.1.1"
"should": "^11.1.1",
"sinon": "^1.17.6"
},

@@ -37,0 +38,0 @@ "scripts": {

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