asv-hlps 1.4.36 → 1.4.38

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.
@@ -111,3 +111,4 @@ export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0
111
111
  export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
112
112
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
113
113
  export declare const pathName: (location: any) => any;
114
+ export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
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.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.reformatDates = exports.firstDayOfDate = exports.dateToString = exports.dateDiff = exports.dateNthWeek = exports.getNthWeek = exports.dateFormatter = exports.replaceSpacesWith = exports.replaceAllIn = exports.toPlural = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = exports.refGenerator = exports.removeBackSlashOccurences = exports.stringifyFormatter = exports.removeString = exports.diffArraysByProp = exports.diffArraysByFunc = exports.deepClone = exports.findFirstSequenceMissing = exports.fillNumWithZero = exports.findSequencesMissing = exports.sequencesToNumbers = exports.notInSequence = exports.currencyFormatterCfa = exports.currencyFormatter = exports.checkAuth = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.duplicateObjects = exports.removeDuplicateValues = exports.removeDuplicateObjects = exports.getRandomColor = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = exports.formatDateFirstDayFr = exports.isEmpty = void 0;
7
- 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 = 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 = void 0;
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const isSameOrBefore_1 = __importDefault(require("dayjs/plugin/isSameOrBefore"));
10
10
  const relativeTime_1 = __importDefault(require("dayjs/plugin/relativeTime"));
@@ -801,3 +801,7 @@ const pathName = (location) => {
801
801
  return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
802
802
  };
803
803
  exports.pathName = pathName;
804
+ const nthIndexOf = (str, charToFind, nthPosition = 1) => {
805
+ return str.split(charToFind, nthPosition).join(charToFind).length;
806
+ };
807
+ exports.nthIndexOf = nthIndexOf;
@@ -111,3 +111,4 @@ export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0
111
111
  export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
112
112
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
113
113
  export declare const pathName: (location: any) => any;
114
+ export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
package/lib/esm/utils.js CHANGED
@@ -709,3 +709,6 @@ export const checkObjInArray = (objs, checkProp, prop = "id") => {
709
709
  export const pathName = (location) => {
710
710
  return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
711
711
  };
712
+ export const nthIndexOf = (str, charToFind, nthPosition = 1) => {
713
+ return str.split(charToFind, nthPosition).join(charToFind).length;
714
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.4.36",
3
+ "version": "1.4.38",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -21,22 +21,22 @@
21
21
  "@types/lodash": "^4.17.16",
22
22
  "@types/pdfmake": "^0.2.11",
23
23
  "@types/randomatic": "^3.1.5",
24
- "@types/react": "^19.0.12"
24
+ "@types/react": "^19.1.4"
25
25
  },
26
26
  "dependencies": {
27
- "@tanstack/react-query": "^5.71.0",
28
- "axios": "^1.8.4",
29
- "class-validator": "^0.14.1",
27
+ "@tanstack/react-query": "^5.76.1",
28
+ "axios": "^1.9.0",
29
+ "class-validator": "^0.14.2",
30
30
  "classnames": "^2.5.1",
31
31
  "dayjs": "^1.11.13",
32
32
  "express": "^4.21.2",
33
33
  "jwt-decode": "^4.0.0",
34
34
  "lodash": "^4.17.21",
35
- "pdfmake": "^0.2.18",
35
+ "pdfmake": "^0.2.20",
36
36
  "randomatic": "^3.1.1",
37
- "typeorm": "^0.3.21",
38
- "typescript": "^5.8.2",
37
+ "typeorm": "^0.3.24",
38
+ "typescript": "^5.8.3",
39
39
  "yup": "^1.6.1",
40
- "zustand": "^5.0.3"
40
+ "zustand": "^5.0.4"
41
41
  }
42
42
  }