asv-hlps 1.4.26 → 1.4.28
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 +6 -1
- package/lib/esm/utils.d.ts +1 -0
- package/lib/esm/utils.js +4 -0
- package/package.json +1 -1
package/lib/cjs/utils.d.ts
CHANGED
|
@@ -110,3 +110,4 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
|
|
|
110
110
|
export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
|
|
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
|
+
export declare const pathUrlName: (location: any) => any;
|
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.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.pathUrlName = 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"));
|
|
@@ -796,3 +796,8 @@ const checkObjInArray = (objs, checkProp, prop = "id") => {
|
|
|
796
796
|
});
|
|
797
797
|
};
|
|
798
798
|
exports.checkObjInArray = checkObjInArray;
|
|
799
|
+
// export const pathUrlName = (location: Location) => {
|
|
800
|
+
const pathUrlName = (location) => {
|
|
801
|
+
return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
|
802
|
+
};
|
|
803
|
+
exports.pathUrlName = pathUrlName;
|
package/lib/esm/utils.d.ts
CHANGED
|
@@ -110,3 +110,4 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
|
|
|
110
110
|
export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
|
|
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
|
+
export declare const pathUrlName: (location: any) => any;
|
package/lib/esm/utils.js
CHANGED
|
@@ -705,3 +705,7 @@ export const checkObjInArray = (objs, checkProp, prop = "id") => {
|
|
|
705
705
|
return x[prop] === checkProp;
|
|
706
706
|
});
|
|
707
707
|
};
|
|
708
|
+
// export const pathUrlName = (location: Location) => {
|
|
709
|
+
export const pathUrlName = (location) => {
|
|
710
|
+
return location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
|
711
|
+
};
|