@contrail/util 1.1.19 → 1.2.0-alpha-otel-2

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.
@@ -1,10 +1,10 @@
1
1
  export declare class StringUtil {
2
2
  static convertToHyphenCase(entityName: string, transformToLowerCase?: boolean): string;
3
3
  static parseVariables(variableString: string, data: any, quoteStrings?: boolean): string;
4
- static convertToCamelCase(str: any): any;
5
- static convertToTitleCase(str: any): any;
6
- static isString(value: any): value is string | String;
7
- static isArray(value: any): value is any[];
4
+ static convertToCamelCase(str: string): string;
5
+ static convertToTitleCase(str: string): string;
6
+ static isString(value: unknown): value is string;
7
+ static isArray(value: unknown): value is any[];
8
8
  static decodeEncodedString(encodedString: string): string;
9
9
  static getStringSizeInMB(str: string): number;
10
10
  }
@@ -14,7 +14,7 @@ class StringUtil {
14
14
  if (!variableString) {
15
15
  return variableString;
16
16
  }
17
- const replacedString = variableString.replace(regExp, (match, group) => {
17
+ const replacedString = variableString.replace(regExp, (_match, group) => {
18
18
  const variableLevels = group.split('.');
19
19
  let replacementValue = data;
20
20
  for (let i = 0; i < variableLevels.length; i++) {
@@ -62,7 +62,7 @@ class StringUtil {
62
62
  return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1);
63
63
  }
64
64
  static isString(value) {
65
- return typeof value === 'string' || value instanceof String;
65
+ return typeof value === 'string';
66
66
  }
67
67
  static isArray(value) {
68
68
  return Array.isArray(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/util",
3
- "version": "1.1.19",
3
+ "version": "1.2.0-alpha-otel-2",
4
4
  "description": "General JavaScript utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",