eslinting
This commit is contained in:
parent
a33edd15b4
commit
f34de8422e
@ -61,7 +61,7 @@ module.exports = function () {
|
|||||||
|
|
||||||
this.Given(/^the query options$/, (table, callback) => {
|
this.Given(/^the query options$/, (table, callback) => {
|
||||||
table.raw().forEach(tuple => {
|
table.raw().forEach(tuple => {
|
||||||
this.queryParams[tuple[0]] = tuple[1]
|
this.queryParams[tuple[0]] = tuple[1];
|
||||||
});
|
});
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
@ -108,7 +108,7 @@ module.exports = function () {
|
|||||||
result.bothw[key] = 'diff';
|
result.bothw[key] = 'diff';
|
||||||
}
|
}
|
||||||
scb();
|
scb();
|
||||||
}
|
};
|
||||||
|
|
||||||
['status', 'time', 'distance', 'speed'].forEach((key) => {
|
['status', 'time', 'distance', 'speed'].forEach((key) => {
|
||||||
sq.defer(parseRes, key);
|
sq.defer(parseRes, key);
|
||||||
|
@ -47,10 +47,10 @@ module.exports = function () {
|
|||||||
if (bearings.length && bearings.length !== waypoints.length) throw new Error('*** number of bearings does not equal the number of waypoints');
|
if (bearings.length && bearings.length !== waypoints.length) throw new Error('*** number of bearings does not equal the number of waypoints');
|
||||||
|
|
||||||
var defaults = {
|
var defaults = {
|
||||||
output: 'json',
|
output: 'json',
|
||||||
steps: 'true',
|
steps: 'true',
|
||||||
alternatives: 'false'
|
alternatives: 'false'
|
||||||
},
|
},
|
||||||
params = this.overwriteParams(defaults, userParams),
|
params = this.overwriteParams(defaults, userParams),
|
||||||
encodedWaypoints = encodeWaypoints(waypoints);
|
encodedWaypoints = encodeWaypoints(waypoints);
|
||||||
|
|
||||||
@ -67,8 +67,8 @@ module.exports = function () {
|
|||||||
|
|
||||||
this.requestNearest = (node, userParams, callback) => {
|
this.requestNearest = (node, userParams, callback) => {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
output: 'json'
|
output: 'json'
|
||||||
},
|
},
|
||||||
params = this.overwriteParams(defaults, userParams);
|
params = this.overwriteParams(defaults, userParams);
|
||||||
params.coordinates = [[node.lon, node.lat].join(',')];
|
params.coordinates = [[node.lon, node.lat].join(',')];
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ module.exports = function () {
|
|||||||
|
|
||||||
this.requestTable = (waypoints, userParams, callback) => {
|
this.requestTable = (waypoints, userParams, callback) => {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
output: 'json'
|
output: 'json'
|
||||||
},
|
},
|
||||||
params = this.overwriteParams(defaults, userParams);
|
params = this.overwriteParams(defaults, userParams);
|
||||||
|
|
||||||
params.coordinates = waypoints.map(w => [w.coord.lon, w.coord.lat].join(','));
|
params.coordinates = waypoints.map(w => [w.coord.lon, w.coord.lat].join(','));
|
||||||
@ -90,8 +90,8 @@ module.exports = function () {
|
|||||||
|
|
||||||
this.requestTrip = (waypoints, userParams, callback) => {
|
this.requestTrip = (waypoints, userParams, callback) => {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
output: 'json'
|
output: 'json'
|
||||||
},
|
},
|
||||||
params = this.overwriteParams(defaults, userParams);
|
params = this.overwriteParams(defaults, userParams);
|
||||||
|
|
||||||
params.coordinates = encodeWaypoints(waypoints);
|
params.coordinates = encodeWaypoints(waypoints);
|
||||||
@ -101,8 +101,8 @@ module.exports = function () {
|
|||||||
|
|
||||||
this.requestMatching = (waypoints, timestamps, userParams, callback) => {
|
this.requestMatching = (waypoints, timestamps, userParams, callback) => {
|
||||||
var defaults = {
|
var defaults = {
|
||||||
output: 'json'
|
output: 'json'
|
||||||
},
|
},
|
||||||
params = this.overwriteParams(defaults, userParams);
|
params = this.overwriteParams(defaults, userParams);
|
||||||
|
|
||||||
params.coordinates = encodeWaypoints(waypoints);
|
params.coordinates = encodeWaypoints(waypoints);
|
||||||
@ -129,7 +129,7 @@ module.exports = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.compassList = (instructions) => {
|
this.compassList = (instructions) => {
|
||||||
return this.extractInstructionList(instructions, s => 'n'); // TODO fixme
|
return this.extractInstructionList(instructions, () => 'n'); // TODO fixme
|
||||||
};
|
};
|
||||||
|
|
||||||
this.bearingList = (instructions) => {
|
this.bearingList = (instructions) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user