drapcode-utility 1.7.4 → 1.7.6

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.
@@ -35,3 +35,5 @@ export declare const validateData: (fields: any, data: any) => {
35
35
  };
36
36
  export declare const validateUrl: (url: any) => boolean;
37
37
  export declare const toggleConsoleLogs: (enable: boolean) => void;
38
+ export declare const replaceSlashWithUnderscore: (value: string) => string;
39
+ export declare const replaceUnderscoreWithSlash: (value: string) => string;
@@ -34,7 +34,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  return (mod && mod.__esModule) ? mod : { "default": mod };
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.toggleConsoleLogs = exports.validateUrl = exports.validateData = exports.fillDefaultValues = exports.replaceValueFromSource = exports.processFieldsInlcude = exports.removeMongoDbId = exports.replaceTransferObjectValueIntoExpression = exports.unflattenObject = exports.parseValueFromData = exports.parseJsonString = exports.replaceDataValueIntoExpression = exports.formatCustomCSSClasses = exports.validateAlphanumericString = exports.convertItemToArray = exports.arraysEqual = exports.checkAndCompareValue = exports.restructureData = exports.formatCollectionAndFieldName = exports.cleanCollectionAndFieldName = exports.stringToExpression = exports.expressionToString = exports.getSpecialCharectorReplacedExpression = exports.validateUuidString = exports.validateEmail = exports.snakeCaseToTitleCase = exports.dynamicSort = exports.checkValidArray = exports.isObject = exports.isEmptyObject = exports.isEmpty = exports.clearSpaceAndReformat = exports.camelize = exports.validateString = void 0;
37
+ exports.replaceUnderscoreWithSlash = exports.replaceSlashWithUnderscore = exports.toggleConsoleLogs = exports.validateUrl = exports.validateData = exports.fillDefaultValues = exports.replaceValueFromSource = exports.processFieldsInlcude = exports.removeMongoDbId = exports.replaceTransferObjectValueIntoExpression = exports.unflattenObject = exports.parseValueFromData = exports.parseJsonString = exports.replaceDataValueIntoExpression = exports.formatCustomCSSClasses = exports.validateAlphanumericString = exports.convertItemToArray = exports.arraysEqual = exports.checkAndCompareValue = exports.restructureData = exports.formatCollectionAndFieldName = exports.cleanCollectionAndFieldName = exports.stringToExpression = exports.expressionToString = exports.getSpecialCharectorReplacedExpression = exports.validateUuidString = exports.validateEmail = exports.snakeCaseToTitleCase = exports.dynamicSort = exports.checkValidArray = exports.isObject = exports.isEmptyObject = exports.isEmpty = exports.clearSpaceAndReformat = exports.camelize = exports.validateString = void 0;
38
38
  var drapcode_constant_1 = require("drapcode-constant");
39
39
  var lodash_1 = __importDefault(require("lodash"));
40
40
  var format_fields_1 = require("../format-fields");
@@ -781,3 +781,13 @@ var toggleConsoleLogs = function (enable) {
781
781
  }
782
782
  };
783
783
  exports.toggleConsoleLogs = toggleConsoleLogs;
784
+ // Utility function to replace '/' with '____'
785
+ var replaceSlashWithUnderscore = function (value) {
786
+ return value && value.replace(/\//g, '____');
787
+ };
788
+ exports.replaceSlashWithUnderscore = replaceSlashWithUnderscore;
789
+ // Utility function to replace '____' with '/'
790
+ var replaceUnderscoreWithSlash = function (value) {
791
+ return value && value.replace(/____/g, '/');
792
+ };
793
+ exports.replaceUnderscoreWithSlash = replaceUnderscoreWithSlash;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -37,9 +37,9 @@
37
37
  "@types/voca": "^1.4.2",
38
38
  "axios": "^1.1.2",
39
39
  "dompurify": "^3.1.7",
40
- "drapcode-constant": "^1.5.9",
41
- "drapcode-logger": "^1.2.6",
42
- "drapcode-redis": "^1.1.5",
40
+ "drapcode-constant": "^1.6.0",
41
+ "drapcode-logger": "^1.2.7",
42
+ "drapcode-redis": "^1.1.6",
43
43
  "exiftool-vendored": "^28.2.1",
44
44
  "express": "^4.17.1",
45
45
  "gm": "^1.25.0",