@dxtmisha/functional-basic 0.2.0 → 0.5.1
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/classes/Datetime.d.ts +7 -0
- package/dist/functions/blobToBase64.d.ts +7 -0
- package/dist/functions/getElementImage.d.ts +7 -0
- package/dist/functions/goScrollSmooth.d.ts +9 -0
- package/dist/functions/removeCommonPrefix.d.ts +8 -0
- package/dist/functions/resizeImageByMax.d.ts +18 -0
- package/dist/functions/uint8ArrayToBase64.d.ts +8 -0
- package/dist/library.d.ts +6 -0
- package/dist/library.js +438 -355
- package/package.json +1 -1
- package/dist/classes/__tests__/Api.test.d.ts +0 -4
- package/dist/classes/__tests__/ApiDefault.test.d.ts +0 -1
- package/dist/classes/__tests__/ApiHeaders.test.d.ts +0 -1
- package/dist/classes/__tests__/ApiPreparation.test.d.ts +0 -1
- package/dist/classes/__tests__/ApiResponse.test.d.ts +0 -4
- package/dist/classes/__tests__/ApiStatus.test.d.ts +0 -1
- package/dist/classes/__tests__/Meta.test.d.ts +0 -4
- package/dist/classes/__tests__/MetaManager.test.d.ts +0 -4
- package/dist/classes/__tests__/MetaOg.test.d.ts +0 -4
- package/dist/classes/__tests__/MetaTwitter.test.d.ts +0 -4
|
@@ -473,6 +473,13 @@ export declare class Datetime {
|
|
|
473
473
|
* Клонировать объект GeoDate и вернуться на 1 день.
|
|
474
474
|
*/
|
|
475
475
|
cloneDayPrevious(): Datetime;
|
|
476
|
+
/**
|
|
477
|
+
* Returns the time zone hour format.
|
|
478
|
+
*
|
|
479
|
+
* Возвращает часовой формат временной зоны.
|
|
480
|
+
* @param hour hour/ час
|
|
481
|
+
*/
|
|
482
|
+
protected toTimeZoneHourFormat(hour: number): string;
|
|
476
483
|
/**
|
|
477
484
|
* Updating all values.
|
|
478
485
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get image element from HTMLImageElement or string source.
|
|
3
|
+
*
|
|
4
|
+
* Получить элемент изображения из HTMLImageElement или строкового источника.
|
|
5
|
+
* @param image image element or string source/ элемент изображения или строковый источник
|
|
6
|
+
*/
|
|
7
|
+
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smooth scrolling to the element.
|
|
3
|
+
*
|
|
4
|
+
* Плавная прокрутка до элемента.
|
|
5
|
+
* @param element target element / целевой элемент
|
|
6
|
+
* @param options scroll options / параметры прокрутки
|
|
7
|
+
* @param shift shift from the top / смещение сверху
|
|
8
|
+
*/
|
|
9
|
+
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes the common prefix from the main string.
|
|
3
|
+
*
|
|
4
|
+
* Убирает общий префикс из основной строки.
|
|
5
|
+
* @param mainStr - The main string / Основная строка
|
|
6
|
+
* @param prefix - The prefix string to remove / Строка префикса для удаления
|
|
7
|
+
*/
|
|
8
|
+
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resize type for image scaling.
|
|
3
|
+
*
|
|
4
|
+
* Тип изменения размера для масштабирования изображения.
|
|
5
|
+
*/
|
|
6
|
+
type ResizeImageByMaxType = 'auto' | 'width' | 'height';
|
|
7
|
+
/**
|
|
8
|
+
* Resizes an image to fit within a maximum size constraint.
|
|
9
|
+
*
|
|
10
|
+
* Изменяет размер изображения в соответствии с ограничением максимального размера.
|
|
11
|
+
* @param image image element or URL / элемент изображения или URL
|
|
12
|
+
* @param maxSize maximum size for width or height / максимальный размер ширины или высоты
|
|
13
|
+
* @param type resize type (auto, width, height) / тип изменения размера (auto, width, height)
|
|
14
|
+
* @param typeData optional data type for the resulting image /
|
|
15
|
+
* необязательный тип данных для результирующего изображения
|
|
16
|
+
*/
|
|
17
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a Uint8Array to a base64 encoded string.
|
|
3
|
+
*
|
|
4
|
+
* Преобразует Uint8Array в строку, закодированную в base64.
|
|
5
|
+
* @param bytes binary data as Uint8Array / бинарные данные в виде Uint8Array
|
|
6
|
+
* @returns base64 encoded string / строка, закодированная в base64
|
|
7
|
+
*/
|
|
8
|
+
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
package/dist/library.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './classes/Translate';
|
|
|
30
30
|
export * from './functions/anyToString';
|
|
31
31
|
export * from './functions/applyTemplate';
|
|
32
32
|
export * from './functions/arrFill';
|
|
33
|
+
export * from './functions/blobToBase64';
|
|
33
34
|
export * from './functions/copyObject';
|
|
34
35
|
export * from './functions/copyObjectLite';
|
|
35
36
|
export * from './functions/createElement';
|
|
@@ -46,6 +47,7 @@ export * from './functions/getClipboardData';
|
|
|
46
47
|
export * from './functions/getColumn';
|
|
47
48
|
export * from './functions/getElement';
|
|
48
49
|
export * from './functions/getElementId';
|
|
50
|
+
export * from './functions/getElementImage';
|
|
49
51
|
export * from './functions/getElementItem';
|
|
50
52
|
export * from './functions/getElementOrWindow';
|
|
51
53
|
export * from './functions/getExp';
|
|
@@ -65,6 +67,7 @@ export * from './functions/getRequestString';
|
|
|
65
67
|
export * from './functions/getStepPercent';
|
|
66
68
|
export * from './functions/getStepValue';
|
|
67
69
|
export * from './functions/goScroll';
|
|
70
|
+
export * from './functions/goScrollSmooth';
|
|
68
71
|
export * from './functions/inArray';
|
|
69
72
|
export * from './functions/initScrollbarOffset';
|
|
70
73
|
export * from './functions/intersectKey';
|
|
@@ -86,8 +89,10 @@ export * from './functions/isSelectedByList';
|
|
|
86
89
|
export * from './functions/isString';
|
|
87
90
|
export * from './functions/isWindow';
|
|
88
91
|
export * from './functions/random';
|
|
92
|
+
export * from './functions/removeCommonPrefix';
|
|
89
93
|
export * from './functions/replaceRecursive';
|
|
90
94
|
export * from './functions/replaceTemplate';
|
|
95
|
+
export * from './functions/resizeImageByMax';
|
|
91
96
|
export * from './functions/secondToTime';
|
|
92
97
|
export * from './functions/setElementItem';
|
|
93
98
|
export * from './functions/setValues';
|
|
@@ -103,6 +108,7 @@ export * from './functions/toNumberByMax';
|
|
|
103
108
|
export * from './functions/toPercent';
|
|
104
109
|
export * from './functions/toPercentBy100';
|
|
105
110
|
export * from './functions/transformation';
|
|
111
|
+
export * from './functions/uint8ArrayToBase64';
|
|
106
112
|
export * from './functions/uniqueArray';
|
|
107
113
|
export * from './functions/writeClipboardData';
|
|
108
114
|
export * from './types/apiTypes';
|