-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
39 lines (36 loc) · 1.74 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require('traceur-runtime');
var average_speed = require('./lib/average_speed.js');
var fix = require('./lib/fix.js');
var itinerary_watcher = require('./lib/itinerary_watcher.js');
var journey_watcher = require('./lib/journey_watcher.js');
var linestring = require('./lib/linestring.js');
var linestring_traverser = require('./lib/linestring_traverser.js');
var node_passing = require('./lib/node_passing.js');
var padder = require('./lib/padder.js');
var segment_analyst = require('./lib/segment_analyst.js');
var smoother = require('./lib/smoother.js');
var util = require('./lib/util.js');
// FIXME: Consider what is actually needed and hide the rest from the interface.
// One can always add to an interface.
var obj = {
calculateAverageSpeed: average_speed.calculateAverageSpeed,
isFix: fix.isFix,
createItineraryWatcher: itinerary_watcher.createItineraryWatcher,
createJourneyWatcher: journey_watcher.createJourneyWatcher,
isLineString: linestring.isLineString,
createLineStringTraverser: linestring_traverser.createLineStringTraverser,
createNodePassingEstimator: node_passing.createNodePassingEstimator,
padToSymmetry: padder.padToSymmetry,
createSegmentAnalyst: segment_analyst.createSegmentAnalyst,
createSmoother: smoother.createSmoother,
calculateDistanceInMeters: util.calculateDistanceInMeters,
calculateTimeDifferenceInSeconds: util.calculateTimeDifferenceInSeconds,
calculateTimeSinceReferenceInSeconds:
util.calculateTimeSinceReferenceInSeconds,
findFirstIndexAfterWindow: util.findFirstIndexAfterWindow,
findFirstIndexWithinWindow: util.findFirstIndexWithinWindow,
isNonNegative: util.isNonNegative
};
// FIXME: For some reason the functions are not exported and only the object is.
obj.default = obj;
module.exports = obj;