hk-bus-eta 1.7.4 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Ctb.js +1 -1
- package/LightRail.js +5 -1
- package/Nwfb.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/Ctb.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = {
|
|
|
9
9
|
response => response.json()
|
|
10
10
|
).then(({data}) => (
|
|
11
11
|
data
|
|
12
|
-
.filter(eta => eta.eta && eta.dir
|
|
12
|
+
.filter(eta => eta.eta && bound.includes(eta.dir))
|
|
13
13
|
// filter the eta by the stop sequence information
|
|
14
14
|
// as the route data may not 100% match
|
|
15
15
|
// use the nearest seq
|
package/LightRail.js
CHANGED
|
@@ -12,7 +12,11 @@ module.exports = {
|
|
|
12
12
|
.reduce((acc, {route_list, platform_id}) => [
|
|
13
13
|
...acc,
|
|
14
14
|
...route_list
|
|
15
|
-
.filter(({route_no, dest_ch, stop}) =>
|
|
15
|
+
.filter(({route_no, dest_ch, dest_en, stop}) => (
|
|
16
|
+
route === route_no
|
|
17
|
+
&& ( dest_ch === dest.zh || dest_en.includes('Circular') )
|
|
18
|
+
&& stop === 0
|
|
19
|
+
))
|
|
16
20
|
.map( ({time_en}) => {
|
|
17
21
|
let waitTime = 0
|
|
18
22
|
switch ( time_en.toLowerCase() ) {
|
package/Nwfb.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = {
|
|
|
9
9
|
response => response.json()
|
|
10
10
|
).then(({data}) => (
|
|
11
11
|
data
|
|
12
|
-
.filter(eta => eta.eta && eta.dir
|
|
12
|
+
.filter(eta => eta.eta && bound.includes(eta.dir))
|
|
13
13
|
// filter the eta by the stop sequence information
|
|
14
14
|
// as the route data may not 100% match
|
|
15
15
|
// use the nearest seq
|
package/index.d.ts
CHANGED