bus-mj 2.0.1 → 2.2.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/README.md +85 -5
- package/data/nodes.js +2 -2
- package/data/relations.js +1 -1
- package/data/result.json +22531 -0
- package/index.d.ts +10 -12
- package/index.js +4 -4
- package/package.json +34 -4
- package/src/getBus.js +48 -27
- package/tsconfig.json +0 -0
package/README.md
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## <u> TANJONA </u>:
|
|
4
4
|
|
|
5
|
-
#### Ho fanampina ireo
|
|
5
|
+
#### Ho fanampina ireo "developer" hanamboatra vahaolana
|
|
6
6
|
|
|
7
|
-
#### Hanamorana ny fitadidiana ny trajet an'bus iray
|
|
8
|
-
|
|
9
|
-
#### Hialana @ tsy fahafantarana ny "arret" tokony ialana
|
|
10
7
|
|
|
11
8
|
## <u> import </u>:
|
|
12
9
|
|
|
@@ -16,7 +13,14 @@ import {
|
|
|
16
13
|
findStopAll,
|
|
17
14
|
findBusDetailById,
|
|
18
15
|
findBusByOneStop,
|
|
19
|
-
findBusByTwoStop
|
|
16
|
+
findBusByTwoStop,
|
|
17
|
+
findOperatorAll,
|
|
18
|
+
findZoneAll,
|
|
19
|
+
findBusDetailByOperator,
|
|
20
|
+
findOpenHoursAll,
|
|
21
|
+
findStopByRef,
|
|
22
|
+
findBusByStopLabel,
|
|
23
|
+
findBusByTwoStopLabel
|
|
20
24
|
} from "bus-mj";
|
|
21
25
|
```
|
|
22
26
|
|
|
@@ -263,6 +267,82 @@ console.log( findBusByTwoStop( 2006531160, 11029976167 ) );
|
|
|
263
267
|
];
|
|
264
268
|
```
|
|
265
269
|
|
|
270
|
+
|
|
271
|
+
- List Bus
|
|
272
|
+
|
|
273
|
+
```js
|
|
274
|
+
// maka ny lisitry ny koperativa ny bus rehetra
|
|
275
|
+
console.log( findOperatorAll() );
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
// result
|
|
280
|
+
[
|
|
281
|
+
'MAMI',
|
|
282
|
+
'KOFIBE/ KOFIMARE',
|
|
283
|
+
'MAHATSINJO',
|
|
284
|
+
'TAMBATRA',
|
|
285
|
+
'NY ANTSIKA',
|
|
286
|
+
'AMBONDRONA',
|
|
287
|
+
'MIRAY',
|
|
288
|
+
'KOFIMARE',
|
|
289
|
+
'AINA'
|
|
290
|
+
]
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
- Find The Right Bus of 2 stop's label
|
|
294
|
+
|
|
295
|
+
```js
|
|
296
|
+
// maka ny lisitry ny bus mandalo @ arret roa
|
|
297
|
+
// ex1: 'abad' - arret bus Abad (Sotema)
|
|
298
|
+
// ex2: 'bord' - arret bus Bord (Majunga be)
|
|
299
|
+
console.log( findBusByTwoStopLabel( 'abad', 'bord' ) );
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
// result
|
|
304
|
+
[
|
|
305
|
+
{
|
|
306
|
+
type: "relation",
|
|
307
|
+
id: 16057683,
|
|
308
|
+
members: [
|
|
309
|
+
...
|
|
310
|
+
{
|
|
311
|
+
type: "node",
|
|
312
|
+
id: 2006531160,
|
|
313
|
+
lat: -15.706214,
|
|
314
|
+
lon: 46.3799647,
|
|
315
|
+
label: "Abad",
|
|
316
|
+
},
|
|
317
|
+
...
|
|
318
|
+
{
|
|
319
|
+
type: 'node',
|
|
320
|
+
id: 11029976167,
|
|
321
|
+
lat: -15.7211965,
|
|
322
|
+
lon: 46.3047163,
|
|
323
|
+
label: 'Bord'
|
|
324
|
+
},
|
|
325
|
+
...
|
|
326
|
+
],
|
|
327
|
+
tags: {
|
|
328
|
+
colour: "orange",
|
|
329
|
+
fee: "yes",
|
|
330
|
+
from: "Belobaka",
|
|
331
|
+
name: "Ligne 7 Plaque Mena",
|
|
332
|
+
network: "Zone Urbaine",
|
|
333
|
+
opening_hours: "Mo-Su 04:00-22:00",
|
|
334
|
+
operator: "MAMI",
|
|
335
|
+
"public_transport:version": "2",
|
|
336
|
+
ref: "7",
|
|
337
|
+
route: "bus",
|
|
338
|
+
to: "Belobaka",
|
|
339
|
+
type: "route",
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
...
|
|
343
|
+
];
|
|
344
|
+
```
|
|
345
|
+
|
|
266
346
|
## <u> Mbola hanampiana azy </u>:
|
|
267
347
|
|
|
268
348
|
- fanavahana ireo arret bus rehetra ao anaty ny fokotany iray
|
package/data/nodes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export default [
|
|
2
2
|
{
|
|
3
3
|
"type": "node",
|
|
4
4
|
"id": 6450569024,
|
|
@@ -73,7 +73,7 @@ module.exports = [
|
|
|
73
73
|
"id": 11029740956,
|
|
74
74
|
"lat": -15.7162443,
|
|
75
75
|
"lon": 46.36241,
|
|
76
|
-
"label": "
|
|
76
|
+
"label": "Fokontany"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"type": "node",
|
package/data/relations.js
CHANGED