@contrail/util 1.0.30 → 1.0.32

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.
@@ -10,9 +10,10 @@ function replaceAllWithFunction(string, regEx, replacerFunction) {
10
10
  let matchedString = match[0];
11
11
  let index = match.index;
12
12
  const newValue = replacerFunction(matchedString);
13
- newString += string.substring(startIndex, index);
13
+ const subString = string.substring(startIndex, index);
14
+ newString += subString;
14
15
  newString += newValue;
15
- startIndex += index + matchedString.length;
16
+ startIndex = index + matchedString.length;
16
17
  hasMatches = true;
17
18
  }
18
19
  if (!(newString === null || newString === void 0 ? void 0 : newString.length) && !hasMatches) {
@@ -1,4 +1,3 @@
1
- import { replaceAllWithFunction } from "./replaceAll/replaceAllWithFunction";
2
1
  export declare class StringUtil {
3
2
  static convertToHyphenCase(entityName: string, transformToLowerCase?: boolean): string;
4
3
  static parseVariables(variableString: string, data: any, quoteStrings?: boolean): string;
@@ -6,5 +5,5 @@ export declare class StringUtil {
6
5
  static convertToTitleCase(str: any): any;
7
6
  static isString(value: any): boolean;
8
7
  static isArray(value: any): boolean;
9
- static replaceAllWithFunction: typeof replaceAllWithFunction;
8
+ static replaceAllWithFunction: any;
10
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/util",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "General javascript utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",