asv-hlps 1.4.65 → 1.4.67
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.
- package/lib/cjs/utils.d.ts +1 -0
- package/lib/cjs/utils.js +5 -1
- package/lib/esm/utils.d.ts +1 -0
- package/lib/esm/utils.js +3 -0
- package/package.json +8 -8
package/lib/cjs/utils.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
|
|
|
120
120
|
export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
|
|
121
121
|
export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
|
|
122
122
|
export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
|
|
123
|
+
export declare const checkEveryOnArrayByProp: (tobs: any[], property: string) => boolean;
|
|
123
124
|
export declare const pathName: (location: any) => any;
|
|
124
125
|
export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
|
|
125
126
|
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.groupedByProp = 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;
|
|
7
|
+
exports.groupedByProp = exports.partOfStringBetweenTwoSpeChar = exports.nthIndexOf = exports.pathName = exports.checkEveryOnArrayByProp = 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"));
|
|
@@ -855,6 +855,10 @@ const checkObjInArray = (objs, checkProp, prop = "id") => {
|
|
|
855
855
|
});
|
|
856
856
|
};
|
|
857
857
|
exports.checkObjInArray = checkObjInArray;
|
|
858
|
+
const checkEveryOnArrayByProp = (tobs, property) => {
|
|
859
|
+
return tobs.every(x => x[property]);
|
|
860
|
+
};
|
|
861
|
+
exports.checkEveryOnArrayByProp = checkEveryOnArrayByProp;
|
|
858
862
|
// export const pathUrlName = (location: Location) => {
|
|
859
863
|
const pathName = (location) => {
|
|
860
864
|
return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
package/lib/esm/utils.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
|
|
|
120
120
|
export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
|
|
121
121
|
export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
|
|
122
122
|
export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
|
|
123
|
+
export declare const checkEveryOnArrayByProp: (tobs: any[], property: string) => boolean;
|
|
123
124
|
export declare const pathName: (location: any) => any;
|
|
124
125
|
export declare const nthIndexOf: (str: string, charToFind: string, nthPosition?: number) => number;
|
|
125
126
|
export declare const partOfStringBetweenTwoSpeChar: (str: string, position1: number, position2: number, char?: string) => string;
|
package/lib/esm/utils.js
CHANGED
|
@@ -758,6 +758,9 @@ export const checkObjInArray = (objs, checkProp, prop = "id") => {
|
|
|
758
758
|
return x[prop] === checkProp;
|
|
759
759
|
});
|
|
760
760
|
};
|
|
761
|
+
export const checkEveryOnArrayByProp = (tobs, property) => {
|
|
762
|
+
return tobs.every(x => x[property]);
|
|
763
|
+
};
|
|
761
764
|
// export const pathUrlName = (location: Location) => {
|
|
762
765
|
export const pathName = (location) => {
|
|
763
766
|
return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asv-hlps",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.67",
|
|
4
4
|
"description": "helpers",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -16,24 +16,24 @@
|
|
|
16
16
|
"author": "Aril Vignon",
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/express": "^5.0.
|
|
19
|
+
"@types/express": "^5.0.5",
|
|
20
20
|
"@types/jwt-decode": "^3.1.0",
|
|
21
21
|
"@types/lodash": "^4.17.20",
|
|
22
|
-
"@types/pdfmake": "^0.2.
|
|
22
|
+
"@types/pdfmake": "^0.2.12",
|
|
23
23
|
"@types/randomatic": "^3.1.5",
|
|
24
|
-
"@types/react": "^19.
|
|
24
|
+
"@types/react": "^19.2.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tanstack/react-query": "^5.90.
|
|
28
|
-
"axios": "^1.
|
|
27
|
+
"@tanstack/react-query": "^5.90.7",
|
|
28
|
+
"axios": "^1.13.2",
|
|
29
29
|
"class-validator": "^0.14.2",
|
|
30
30
|
"classnames": "^2.5.1",
|
|
31
|
-
"dayjs": "^1.11.
|
|
31
|
+
"dayjs": "^1.11.19",
|
|
32
32
|
"express": "^4.21.2",
|
|
33
33
|
"i": "^0.3.7",
|
|
34
34
|
"jwt-decode": "^4.0.0",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
|
-
"npm": "^11.6.
|
|
36
|
+
"npm": "^11.6.2",
|
|
37
37
|
"pdfmake": "^0.2.20",
|
|
38
38
|
"randomatic": "^3.1.1",
|
|
39
39
|
"remove-accents": "^0.5.0",
|