denwa-web-shared 1.0.16 → 1.0.17
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/dist/server/index.cjs.js
CHANGED
|
@@ -255,6 +255,15 @@ const generatePaginationArray = (pagination, baseUrl, initialParams) => {
|
|
|
255
255
|
lastPage
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
+
const arrayToKeyValueObject = (arr) => {
|
|
259
|
+
return arr.reduce(
|
|
260
|
+
(acc, item) => {
|
|
261
|
+
acc[item] = item;
|
|
262
|
+
return acc;
|
|
263
|
+
},
|
|
264
|
+
{}
|
|
265
|
+
);
|
|
266
|
+
};
|
|
258
267
|
function r(e) {
|
|
259
268
|
var t, f, n = "";
|
|
260
269
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -6687,6 +6696,7 @@ const BasePicture = ({
|
|
|
6687
6696
|
exports.BasePicture = BasePicture;
|
|
6688
6697
|
exports.THEME = THEME;
|
|
6689
6698
|
exports.TIME = TIME;
|
|
6699
|
+
exports.arrayToKeyValueObject = arrayToKeyValueObject;
|
|
6690
6700
|
exports.checkCorrectImageObject = checkCorrectImageObject;
|
|
6691
6701
|
exports.cn = cn;
|
|
6692
6702
|
exports.convertPhoneMask = convertPhoneMask;
|
package/dist/server/index.es.js
CHANGED
|
@@ -253,6 +253,15 @@ const generatePaginationArray = (pagination, baseUrl, initialParams) => {
|
|
|
253
253
|
lastPage
|
|
254
254
|
};
|
|
255
255
|
};
|
|
256
|
+
const arrayToKeyValueObject = (arr) => {
|
|
257
|
+
return arr.reduce(
|
|
258
|
+
(acc, item) => {
|
|
259
|
+
acc[item] = item;
|
|
260
|
+
return acc;
|
|
261
|
+
},
|
|
262
|
+
{}
|
|
263
|
+
);
|
|
264
|
+
};
|
|
256
265
|
function r(e) {
|
|
257
266
|
var t, f, n = "";
|
|
258
267
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -6686,6 +6695,7 @@ export {
|
|
|
6686
6695
|
BasePicture,
|
|
6687
6696
|
THEME,
|
|
6688
6697
|
TIME,
|
|
6698
|
+
arrayToKeyValueObject,
|
|
6689
6699
|
checkCorrectImageObject,
|
|
6690
6700
|
cn,
|
|
6691
6701
|
convertPhoneMask,
|
|
@@ -124,3 +124,8 @@ export declare const prepareColor: ({ color1, color2, notFoundText, COLORS_NAMES
|
|
|
124
124
|
* @param initialParams - Параметры url
|
|
125
125
|
*/
|
|
126
126
|
export declare const generatePaginationArray: (pagination: IPaginate | null, baseUrl: string, initialParams: Record<string, string>) => PaginationResult;
|
|
127
|
+
/**
|
|
128
|
+
* @description Превращение массива в объект ключ-значение
|
|
129
|
+
* @param arr - Массив
|
|
130
|
+
*/
|
|
131
|
+
export declare const arrayToKeyValueObject: <T extends string>(arr: T[]) => Record<T, T>;
|