@golemio/pid 2.13.10-dev.1342209321 → 2.13.10-dev.1342573042

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.
@@ -5,6 +5,11 @@ export declare class MpvStopParser {
5
5
  * 1/3 -> 1/3
6
6
  * -/3 -> 3
7
7
  * 1/- -> 1
8
+ * -/BUS -> BUS
9
+ * 2/100V -> 2/100V
10
+ * -/5 C-F -> 5
11
+ * 2/5 A -> 2/5
12
+ * 5A/- A C -> 5A
8
13
  */
9
14
  static parsePlatformCode(cisStop: IMpvStopContent): string | null;
10
15
  }
@@ -7,13 +7,18 @@ class MpvStopParser {
7
7
  * 1/3 -> 1/3
8
8
  * -/3 -> 3
9
9
  * 1/- -> 1
10
+ * -/BUS -> BUS
11
+ * 2/100V -> 2/100V
12
+ * -/5 C-F -> 5
13
+ * 2/5 A -> 2/5
14
+ * 5A/- A C -> 5A
10
15
  */
11
16
  static parsePlatformCode(cisStop) {
12
17
  const platformCode = cisStop.$.stan;
13
18
  if (!platformCode) {
14
19
  return null;
15
20
  }
16
- return platformCode.replace(/-\/|\/-/s, "");
21
+ return platformCode.replace(/-\/|\/-|\s+.*$/g, "");
17
22
  }
18
23
  }
19
24
  exports.MpvStopParser = MpvStopParser;
@@ -1 +1 @@
1
- {"version":3,"file":"MpvStopParser.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/mpv-net/MpvStopParser.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IACtB;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAwB;QAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QACpC,IAAI,CAAC,YAAY,EAAE;YACf,OAAO,IAAI,CAAC;SACf;QAED,OAAO,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ;AAfD,sCAeC"}
1
+ {"version":3,"file":"MpvStopParser.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/mpv-net/MpvStopParser.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IACtB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAwB;QAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QACpC,IAAI,CAAC,YAAY,EAAE;YACf,OAAO,IAAI,CAAC;SACf;QAED,OAAO,YAAY,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ;AApBD,sCAoBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "2.13.10-dev.1342209321",
3
+ "version": "2.13.10-dev.1342573042",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",