bruce-models 4.3.3 → 4.3.5

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.
@@ -2956,7 +2956,8 @@
2956
2956
  */
2957
2957
  (function (PathUtils) {
2958
2958
  /**
2959
- * Parses a string path into an array of strings.
2959
+ * Parses a Bruce string path into an array of strings.
2960
+ * Example of path: "\"location\"/\"latitude\"" or "location/latitude".
2960
2961
  * @param str
2961
2962
  * @returns
2962
2963
  */
@@ -2964,23 +2965,17 @@
2964
2965
  if (!(str === null || str === void 0 ? void 0 : str.length)) {
2965
2966
  return [];
2966
2967
  }
2967
- const broken = str.split("\"/\"");
2968
- if (broken.length > 0) {
2969
- let top = broken[0];
2970
- if (top.length > 0) {
2971
- if (top.charAt(0) == "\"") {
2972
- top = top.substring(1);
2973
- }
2974
- broken[0] = top;
2968
+ const broken = str.split("/");
2969
+ // Remove quotes from the first and last chars.
2970
+ for (let i = 0; i < broken.length; i++) {
2971
+ let piece = broken[i];
2972
+ if (piece.startsWith("\"")) {
2973
+ piece = piece.substring(1);
2975
2974
  }
2976
- const endIndex = broken.length - 1;
2977
- let bot = broken[endIndex];
2978
- if (bot.length > 0) {
2979
- if (bot.charAt(bot.length - 1) == "\"") {
2980
- bot = bot.substring(0, bot.length - 1);
2981
- }
2982
- broken[endIndex] = bot;
2975
+ if (piece.endsWith("\"")) {
2976
+ piece = piece.substring(0, piece.length - 1);
2983
2977
  }
2978
+ broken[i] = piece;
2984
2979
  }
2985
2980
  return broken;
2986
2981
  }
@@ -13084,7 +13079,7 @@
13084
13079
  })(exports.DataSource || (exports.DataSource = {}));
13085
13080
 
13086
13081
  // This is updated with the package.json version on build.
13087
- const VERSION = "4.3.3";
13082
+ const VERSION = "4.3.5";
13088
13083
 
13089
13084
  exports.VERSION = VERSION;
13090
13085
  exports.AbstractApi = AbstractApi;