asv-hlps 1.3.67 → 1.3.69

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.
@@ -1,7 +1,7 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./bootstrap";
4
+ export * from "./shared/bazars/BsColors";
5
5
  export * from "./buys";
6
6
  export * from "./cashs";
7
7
  export * from "./comptas";
package/lib/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./acts"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./bills"), exports);
20
- __exportStar(require("./bootstrap"), exports);
20
+ __exportStar(require("./shared/bazars/BsColors"), exports);
21
21
  __exportStar(require("./buys"), exports);
22
22
  __exportStar(require("./cashs"), exports);
23
23
  __exportStar(require("./comptas"), exports);
@@ -0,0 +1,2 @@
1
+ type BsColors = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
2
+ export default BsColors;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { default as BsColors } from "./BsColors";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -36,6 +36,7 @@ export declare const diffArraysByProp: (arr1: any[], arr2: any[], propArr1?: str
36
36
  export declare const removeString: (text: string, word: string) => string;
37
37
  export declare const stringifyFormatter: (data: any, space?: string | number) => string;
38
38
  export declare const removeBackSlashOccurences: (text: string, toChar: string) => string;
39
+ export declare const refGenerator: (char?: string, regex?: RegExp, toChar?: string) => string;
39
40
  export declare const genSequenceRef: (refs: any[], startChars: string, zeroFillWidth: number, dateFormat?: string) => string;
40
41
  export declare const sesStorageSet: (key: string, val: any) => void;
41
42
  export declare const sesStorageGet: (key: string) => any;
package/lib/cjs/utils.js CHANGED
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.calculPercent = exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.reformatDates = exports.dateToString = exports.dateDiff = exports.dateFormatter = exports.replaceSpacesWith = exports.replaceAllIn = exports.toPlural = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = 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.formatToStringCfa = exports.currencyFormatter = exports.formatToString = exports.checkAuth = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.duplicateObjects = exports.removeDuplicateObjects = exports.getRandomColor = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = void 0;
7
- exports.toggleProp = exports.roundLastNDigits = exports.removeParamKeyName = exports.countryIsoToFlag = exports.monthStringName = exports.returnBool = exports.formatAmountToString = exports.reduceSum = exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = void 0;
6
+ exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.reformatDates = exports.dateToString = exports.dateDiff = 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.formatToStringCfa = exports.currencyFormatter = exports.formatToString = exports.checkAuth = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.duplicateObjects = exports.removeDuplicateObjects = exports.getRandomColor = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = void 0;
7
+ exports.toggleProp = exports.roundLastNDigits = exports.removeParamKeyName = exports.countryIsoToFlag = exports.monthStringName = exports.returnBool = exports.formatAmountToString = exports.reduceSum = exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = void 0;
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const relativeTime_1 = __importDefault(require("dayjs/plugin/relativeTime"));
10
10
  const lodash_1 = __importDefault(require("lodash"));
@@ -249,6 +249,12 @@ const removeBackSlashOccurences = (text, toChar) => {
249
249
  return String(text).toLowerCase().replace(regex, toChar) || text;
250
250
  };
251
251
  exports.removeBackSlashOccurences = removeBackSlashOccurences;
252
+ const refGenerator = (char = "c", regex = /\/+/gi, toChar = "") => {
253
+ let date = new Date();
254
+ const nDate = char.toUpperCase() + date.toLocaleDateString().split("-").join("") + date.toLocaleTimeString().split(":").join("");
255
+ return (0, exports.replaceAllIn)(nDate, regex, toChar).toLocaleUpperCase();
256
+ };
257
+ exports.refGenerator = refGenerator;
252
258
  const genSequenceRef = (refs, startChars, zeroFillWidth, dateFormat = "") => {
253
259
  if (!refs.length) {
254
260
  return startChars + dateFormat + (0, exports.fillNumWithZero)(1, zeroFillWidth);
@@ -1,7 +1,7 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./bootstrap";
4
+ export * from "./shared/bazars/BsColors";
5
5
  export * from "./buys";
6
6
  export * from "./cashs";
7
7
  export * from "./comptas";
package/lib/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./bootstrap";
4
+ export * from "./shared/bazars/BsColors";
5
5
  export * from "./buys";
6
6
  export * from "./cashs";
7
7
  export * from "./comptas";
@@ -0,0 +1,2 @@
1
+ type BsColors = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
2
+ export default BsColors;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as BsColors } from "./BsColors";
@@ -0,0 +1 @@
1
+ export {};
@@ -36,6 +36,7 @@ export declare const diffArraysByProp: (arr1: any[], arr2: any[], propArr1?: str
36
36
  export declare const removeString: (text: string, word: string) => string;
37
37
  export declare const stringifyFormatter: (data: any, space?: string | number) => string;
38
38
  export declare const removeBackSlashOccurences: (text: string, toChar: string) => string;
39
+ export declare const refGenerator: (char?: string, regex?: RegExp, toChar?: string) => string;
39
40
  export declare const genSequenceRef: (refs: any[], startChars: string, zeroFillWidth: number, dateFormat?: string) => string;
40
41
  export declare const sesStorageSet: (key: string, val: any) => void;
41
42
  export declare const sesStorageGet: (key: string) => any;
package/lib/esm/utils.js CHANGED
@@ -215,6 +215,11 @@ export const removeBackSlashOccurences = (text, toChar) => {
215
215
  const regex = /\/+/gi;
216
216
  return String(text).toLowerCase().replace(regex, toChar) || text;
217
217
  };
218
+ export const refGenerator = (char = "c", regex = /\/+/gi, toChar = "") => {
219
+ let date = new Date();
220
+ const nDate = char.toUpperCase() + date.toLocaleDateString().split("-").join("") + date.toLocaleTimeString().split(":").join("");
221
+ return replaceAllIn(nDate, regex, toChar).toLocaleUpperCase();
222
+ };
218
223
  export const genSequenceRef = (refs, startChars, zeroFillWidth, dateFormat = "") => {
219
224
  if (!refs.length) {
220
225
  return startChars + dateFormat + fillNumWithZero(1, zeroFillWidth);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.3.67",
3
+ "version": "1.3.69",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",