china-railway-station 1.0.0 → 2.0.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/LICENSE +1 -1
- package/README.md +36 -17
- package/build/index.cjs +1 -1
- package/build/index.d.cts +38 -34
- package/build/index.d.ts +38 -34
- package/build/index.iife.js +1 -1
- package/build/index.js +1 -1
- package/package.json +5 -9
package/build/index.d.cts
CHANGED
|
@@ -26,38 +26,42 @@ interface Station {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/index.d.ts
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
29
|
+
declare class ChinaRailwayStation {
|
|
30
|
+
#private;
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
* 获取车站全部列表
|
|
34
|
+
*/
|
|
35
|
+
get list(): Station[];
|
|
36
|
+
/**
|
|
37
|
+
* 获取车站全部列表(城市分组格式)
|
|
38
|
+
*/
|
|
39
|
+
get group(): Partial<Record<string, Station[]>>;
|
|
40
|
+
/**
|
|
41
|
+
* 模糊搜索车站
|
|
42
|
+
* @param keyword 关键词
|
|
43
|
+
*/
|
|
44
|
+
find(keyword: string): Station[];
|
|
45
|
+
/**
|
|
46
|
+
* 通过车站名获取车站信息
|
|
47
|
+
* @param name 车站名
|
|
48
|
+
*/
|
|
49
|
+
findByName(name: string): Station | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* 通过电报码获取车站信息
|
|
52
|
+
* @param telecode 电报码
|
|
53
|
+
*/
|
|
54
|
+
findByTelecode(telecode: string): Station | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* 通过拼音码获取车站信息
|
|
57
|
+
* @param pinyinCode 拼音码
|
|
58
|
+
*/
|
|
59
|
+
findByPinyinCode(pinyinCode: string): Station[];
|
|
60
|
+
/**
|
|
61
|
+
* 通过城市名或城市编码获取车站信息
|
|
62
|
+
* @param city 城市名/城市编码
|
|
63
|
+
*/
|
|
64
|
+
findByCity(city: string): Station[];
|
|
65
|
+
}
|
|
62
66
|
//#endregion
|
|
63
|
-
export { Station,
|
|
67
|
+
export { Station, ChinaRailwayStation as default };
|
package/build/index.d.ts
CHANGED
|
@@ -26,38 +26,42 @@ interface Station {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/index.d.ts
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
29
|
+
declare class ChinaRailwayStation {
|
|
30
|
+
#private;
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
* 获取车站全部列表
|
|
34
|
+
*/
|
|
35
|
+
get list(): Station[];
|
|
36
|
+
/**
|
|
37
|
+
* 获取车站全部列表(城市分组格式)
|
|
38
|
+
*/
|
|
39
|
+
get group(): Partial<Record<string, Station[]>>;
|
|
40
|
+
/**
|
|
41
|
+
* 模糊搜索车站
|
|
42
|
+
* @param keyword 关键词
|
|
43
|
+
*/
|
|
44
|
+
find(keyword: string): Station[];
|
|
45
|
+
/**
|
|
46
|
+
* 通过车站名获取车站信息
|
|
47
|
+
* @param name 车站名
|
|
48
|
+
*/
|
|
49
|
+
findByName(name: string): Station | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* 通过电报码获取车站信息
|
|
52
|
+
* @param telecode 电报码
|
|
53
|
+
*/
|
|
54
|
+
findByTelecode(telecode: string): Station | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* 通过拼音码获取车站信息
|
|
57
|
+
* @param pinyinCode 拼音码
|
|
58
|
+
*/
|
|
59
|
+
findByPinyinCode(pinyinCode: string): Station[];
|
|
60
|
+
/**
|
|
61
|
+
* 通过城市名或城市编码获取车站信息
|
|
62
|
+
* @param city 城市名/城市编码
|
|
63
|
+
*/
|
|
64
|
+
findByCity(city: string): Station[];
|
|
65
|
+
}
|
|
62
66
|
//#endregion
|
|
63
|
-
export { Station,
|
|
67
|
+
export { Station, ChinaRailwayStation as default };
|