asv-hlps 1.4.61 → 1.4.62

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.
@@ -122,3 +122,4 @@ export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
122
122
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
123
123
  export declare const pathName: (location: any) => any;
124
124
  export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
125
+ export declare const partOfStringBetweenTwoSpeChar: (str: string, position1: number, position2: number, char?: string) => string;
package/lib/cjs/utils.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.dateNth = exports.dateNthMonth = exports.dateNthDay = exports.dateNthWeek = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.reformatDates = exports.firstDayOfDate = exports.dateToString = exports.dateDiff = exports.dateFormatter = exports.replaceSpacesWith = exports.replaceAllIn = exports.toPlural = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = exports.removeSpecialCharsAndSpaces = exports.refGenerator = exports.removeAMPM = exports.removeBackSlashOccurences = exports.stringifyFormatter = exports.removeString = exports.diffArraysByProp = exports.diffArraysByFunc = exports.deepClone = exports.findFirstSequenceMissing = exports.fillNumWithZero = exports.findSequencesMissing = exports.removeAccent = exports.sequencesToNumbers = exports.notInSequence = exports.currencyFormatterCfa = exports.currencyFormatter = exports.checkAuth = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.duplicateObjectsGrouped = exports.duplicateObjects = exports.removeDuplicateValues = exports.removeDuplicateObjects = exports.getRandomColor = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = exports.formatDateFirstDayFr = exports.isEmpty = void 0;
7
- exports.nthIndexOf = exports.pathName = exports.checkObjInArray = exports.arraySome = exports.winMaxHeight = exports.toggleProp = exports.roundLastNDigits = exports.removeParamKeyName = exports.countryIsoToFlag = exports.monthStringName = exports.returnBool = exports.formatAmountToString = exports.reduceTimes = exports.reduceSum = exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.genRandomNumberArray = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = void 0;
7
+ exports.partOfStringBetweenTwoSpeChar = exports.nthIndexOf = exports.pathName = exports.checkObjInArray = exports.arraySome = exports.winMaxHeight = exports.toggleProp = exports.roundLastNDigits = exports.removeParamKeyName = exports.countryIsoToFlag = exports.monthStringName = exports.returnBool = exports.formatAmountToString = exports.reduceTimes = exports.reduceSum = exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.genRandomNumberArray = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = void 0;
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const dayOfYear_1 = __importDefault(require("dayjs/plugin/dayOfYear"));
10
10
  const isSameOrBefore_1 = __importDefault(require("dayjs/plugin/isSameOrBefore"));
@@ -864,3 +864,9 @@ const nthIndexOf = (str, charToFind, nthPosition = 1) => {
864
864
  return str.split(charToFind, nthPosition).join(charToFind).length;
865
865
  };
866
866
  exports.nthIndexOf = nthIndexOf;
867
+ const partOfStringBetweenTwoSpeChar = (str, position1, position2, char = "/") => {
868
+ const firstSlashPosition = (0, exports.nthIndexOf)(str, char, position1);
869
+ const secondSlashPosition = (0, exports.nthIndexOf)(str, char, position2);
870
+ return str.substring(firstSlashPosition + 1, secondSlashPosition);
871
+ };
872
+ exports.partOfStringBetweenTwoSpeChar = partOfStringBetweenTwoSpeChar;
@@ -122,3 +122,4 @@ export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
122
122
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
123
123
  export declare const pathName: (location: any) => any;
124
124
  export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
125
+ export declare const partOfStringBetweenTwoSpeChar: (str: string, position1: number, position2: number, char?: string) => string;
package/lib/esm/utils.js CHANGED
@@ -765,3 +765,8 @@ export const pathName = (location) => {
765
765
  export const nthIndexOf = (str, charToFind, nthPosition = 1) => {
766
766
  return str.split(charToFind, nthPosition).join(charToFind).length;
767
767
  };
768
+ export const partOfStringBetweenTwoSpeChar = (str, position1, position2, char = "/") => {
769
+ const firstSlashPosition = nthIndexOf(str, char, position1);
770
+ const secondSlashPosition = nthIndexOf(str, char, position2);
771
+ return str.substring(firstSlashPosition + 1, secondSlashPosition);
772
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.4.61",
3
+ "version": "1.4.62",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",