@dxtmisha/functional-basic 1.1.0 → 1.1.6
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/CHANGELOG.md +81 -0
- package/ai-description.txt +1 -0
- package/ai-types.txt +1062 -951
- package/dist/classes/Api.d.ts +201 -0
- package/dist/classes/ApiCache.d.ts +152 -0
- package/dist/classes/ApiDataReturn.d.ts +76 -0
- package/dist/classes/ApiDefault.d.ts +49 -0
- package/dist/classes/ApiHeaders.d.ts +37 -0
- package/dist/classes/ApiHydration.d.ts +39 -0
- package/dist/classes/ApiInstance.d.ts +283 -0
- package/dist/classes/ApiPreparation.d.ts +58 -0
- package/dist/classes/ApiResponse.d.ts +154 -0
- package/dist/classes/ApiStatus.d.ts +130 -0
- package/dist/classes/BroadcastMessage.d.ts +75 -0
- package/dist/classes/Cache.d.ts +38 -0
- package/dist/classes/CacheItem.d.ts +62 -0
- package/dist/classes/CacheStatic.d.ts +36 -0
- package/dist/classes/Cookie.d.ts +54 -0
- package/dist/classes/CookieBlock.d.ts +30 -0
- package/dist/classes/CookieBlockInstance.d.ts +23 -0
- package/dist/classes/CookieStorage.d.ts +174 -0
- package/dist/classes/DataStorage.d.ts +107 -0
- package/dist/classes/Datetime.d.ts +570 -0
- package/dist/classes/ErrorCenter.d.ts +72 -0
- package/dist/classes/ErrorCenterHandler.d.ts +64 -0
- package/dist/classes/ErrorCenterInstance.d.ts +85 -0
- package/dist/classes/EventItem.d.ts +251 -0
- package/dist/classes/Formatters.d.ts +161 -0
- package/dist/classes/Geo.d.ts +151 -0
- package/dist/classes/GeoFlag.d.ts +98 -0
- package/dist/classes/GeoInstance.d.ts +215 -0
- package/dist/classes/GeoIntl.d.ts +304 -0
- package/dist/classes/GeoPhone.d.ts +108 -0
- package/dist/classes/Global.d.ts +29 -0
- package/dist/classes/Hash.d.ts +57 -0
- package/dist/classes/HashInstance.d.ts +95 -0
- package/dist/classes/Icons.d.ts +128 -0
- package/dist/classes/Loading.d.ts +66 -0
- package/dist/classes/LoadingInstance.d.ts +99 -0
- package/dist/classes/Meta.d.ts +186 -0
- package/dist/classes/MetaManager.d.ts +121 -0
- package/dist/classes/MetaOg.d.ts +115 -0
- package/dist/classes/MetaStatic.d.ts +179 -0
- package/dist/classes/MetaTwitter.d.ts +115 -0
- package/dist/classes/ResumableTimer.d.ts +81 -0
- package/dist/classes/ScrollbarWidth.d.ts +51 -0
- package/dist/classes/SearchList.d.ts +128 -0
- package/dist/classes/SearchListData.d.ts +143 -0
- package/dist/classes/SearchListItem.d.ts +49 -0
- package/dist/classes/SearchListMatcher.d.ts +57 -0
- package/dist/classes/SearchListOptions.d.ts +66 -0
- package/dist/classes/ServerStorage.d.ts +106 -0
- package/dist/classes/StorageCallback.d.ts +84 -0
- package/dist/classes/Translate.d.ts +119 -0
- package/dist/classes/TranslateFile.d.ts +81 -0
- package/dist/classes/TranslateInstance.d.ts +206 -0
- package/dist/functions/addTagHighlightMatch.d.ts +11 -0
- package/dist/functions/anyToString.d.ts +10 -0
- package/dist/functions/applyTemplate.d.ts +10 -0
- package/dist/functions/arrFill.d.ts +9 -0
- package/dist/functions/blobToBase64.d.ts +9 -0
- package/dist/functions/capitalize.d.ts +9 -0
- package/dist/functions/copyObject.d.ts +10 -0
- package/dist/functions/copyObjectLite.d.ts +9 -0
- package/dist/functions/createElement.d.ts +21 -0
- package/dist/functions/domQuerySelector.d.ts +8 -0
- package/dist/functions/domQuerySelectorAll.d.ts +8 -0
- package/dist/functions/encodeAttribute.d.ts +8 -0
- package/dist/functions/encodeLiteAttribute.d.ts +8 -0
- package/dist/functions/ensureMaxSize.d.ts +10 -0
- package/dist/functions/escapeExp.d.ts +7 -0
- package/dist/functions/eventStopPropagation.d.ts +7 -0
- package/dist/functions/executeFunction.d.ts +12 -0
- package/dist/functions/executePromise.d.ts +11 -0
- package/dist/functions/forEach.d.ts +14 -0
- package/dist/functions/frame.d.ts +10 -0
- package/dist/functions/getArrayHighlightMatch.d.ts +10 -0
- package/dist/functions/getAttributes.d.ts +9 -0
- package/dist/functions/getClipboardData.d.ts +9 -0
- package/dist/functions/getColumn.d.ts +10 -0
- package/dist/functions/getCurrentDate.d.ts +19 -0
- package/dist/functions/getCurrentTime.d.ts +15 -0
- package/dist/functions/getElement.d.ts +9 -0
- package/dist/functions/getElementId.d.ts +26 -0
- package/dist/functions/getElementImage.d.ts +8 -0
- package/dist/functions/getElementItem.d.ts +12 -0
- package/dist/functions/getElementOrWindow.d.ts +8 -0
- package/dist/functions/getElementSafeScript.d.ts +9 -0
- package/dist/functions/getExactSearchExp.d.ts +8 -0
- package/dist/functions/getExp.d.ts +14 -0
- package/dist/functions/getHydrationData.d.ts +10 -0
- package/dist/functions/getItemByPath.d.ts +9 -0
- package/dist/functions/getKey.d.ts +8 -0
- package/dist/functions/getLengthOfAllArray.d.ts +8 -0
- package/dist/functions/getMaxLengthAllArray.d.ts +9 -0
- package/dist/functions/getMinLengthAllArray.d.ts +8 -0
- package/dist/functions/getMouseClient.d.ts +9 -0
- package/dist/functions/getMouseClientX.d.ts +8 -0
- package/dist/functions/getMouseClientY.d.ts +8 -0
- package/dist/functions/getObjectByKeys.d.ts +8 -0
- package/dist/functions/getObjectNoUndefined.d.ts +9 -0
- package/dist/functions/getObjectOrNone.d.ts +8 -0
- package/dist/functions/getOnlyText.d.ts +8 -0
- package/dist/functions/getRandomText.d.ts +12 -0
- package/dist/functions/getRequestString.d.ts +11 -0
- package/dist/functions/getSearchExp.d.ts +12 -0
- package/dist/functions/getSeparatingSearchExp.d.ts +9 -0
- package/dist/functions/getStepPercent.d.ts +9 -0
- package/dist/functions/getStepValue.d.ts +9 -0
- package/dist/functions/goScroll.d.ts +10 -0
- package/dist/functions/goScrollSmooth.d.ts +10 -0
- package/dist/functions/goScrollTo.d.ts +10 -0
- package/dist/functions/handleShare.d.ts +10 -0
- package/dist/functions/inArray.d.ts +9 -0
- package/dist/functions/initScrollbarOffset.d.ts +7 -0
- package/dist/functions/intersectKey.d.ts +9 -0
- package/dist/functions/isApiSuccess.d.ts +9 -0
- package/dist/functions/isArray.d.ts +8 -0
- package/dist/functions/isDifferent.d.ts +10 -0
- package/dist/functions/isDomData.d.ts +7 -0
- package/dist/functions/isDomRuntime.d.ts +10 -0
- package/dist/functions/isElementVisible.d.ts +11 -0
- package/dist/functions/isEnter.d.ts +9 -0
- package/dist/functions/isFilled.d.ts +10 -0
- package/dist/functions/isFloat.d.ts +8 -0
- package/dist/functions/isFunction.d.ts +9 -0
- package/dist/functions/isInDom.d.ts +9 -0
- package/dist/functions/isInput.d.ts +8 -0
- package/dist/functions/isIntegerBetween.d.ts +9 -0
- package/dist/functions/isNull.d.ts +9 -0
- package/dist/functions/isNumber.d.ts +8 -0
- package/dist/functions/isObject.d.ts +8 -0
- package/dist/functions/isObjectNotArray.d.ts +8 -0
- package/dist/functions/isOnLine.d.ts +7 -0
- package/dist/functions/isSelected.d.ts +9 -0
- package/dist/functions/isSelectedByList.d.ts +9 -0
- package/dist/functions/isShare.d.ts +7 -0
- package/dist/functions/isString.d.ts +8 -0
- package/dist/functions/isWindow.d.ts +7 -0
- package/dist/functions/random.d.ts +9 -0
- package/dist/functions/removeCommonPrefix.d.ts +9 -0
- package/dist/functions/replaceComponentName.d.ts +9 -0
- package/dist/functions/replaceRecursive.d.ts +11 -0
- package/dist/functions/replaceTemplate.d.ts +10 -0
- package/dist/functions/resizeImageByMax.d.ts +19 -0
- package/dist/functions/secondToTime.d.ts +9 -0
- package/dist/functions/setElementItem.d.ts +11 -0
- package/dist/functions/setValues.d.ts +18 -0
- package/dist/functions/sleep.d.ts +8 -0
- package/dist/functions/splice.d.ts +13 -0
- package/dist/functions/strFill.d.ts +9 -0
- package/dist/functions/strSplit.d.ts +12 -0
- package/dist/functions/toArray.d.ts +17 -0
- package/dist/functions/toCamelCase.d.ts +8 -0
- package/dist/functions/toCamelCaseFirst.d.ts +8 -0
- package/dist/functions/toDate.d.ts +8 -0
- package/dist/functions/toKebabCase.d.ts +15 -0
- package/dist/functions/toNumber.d.ts +19 -0
- package/dist/functions/toNumberByMax.d.ts +11 -0
- package/dist/functions/toPercent.d.ts +9 -0
- package/dist/functions/toPercentBy100.d.ts +9 -0
- package/dist/functions/toString.d.ts +8 -0
- package/dist/functions/transformation.d.ts +21 -0
- package/dist/functions/uint8ArrayToBase64.d.ts +8 -0
- package/dist/functions/uniqueArray.d.ts +8 -0
- package/dist/functions/writeClipboardData.d.ts +8 -0
- package/dist/library.d.ts +171 -8722
- package/dist/library.js +416 -338
- package/dist/media/errorCauseList.d.ts +2 -0
- package/dist/types/apiTypes.d.ts +217 -0
- package/dist/types/basicTypes.d.ts +131 -0
- package/dist/types/errorCenter.d.ts +42 -0
- package/dist/types/formattersTypes.d.ts +224 -0
- package/dist/types/geoTypes.d.ts +86 -0
- package/dist/types/metaTypes.d.ts +586 -0
- package/dist/types/searchTypes.d.ts +53 -0
- package/dist/types/translateTypes.d.ts +54 -0
- package/package.json +7 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a random integer.
|
|
3
|
+
*
|
|
4
|
+
* Генерирует случайное число.
|
|
5
|
+
* @param min the lowest value to return/ наименьшее значение
|
|
6
|
+
* @param max the highest value to return/ наибольшее значение
|
|
7
|
+
* @returns random number/ случайное число
|
|
8
|
+
*/
|
|
9
|
+
export declare function random(min: number, max: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
* @returns string without prefix / строка без префикса
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces the component name in the text.
|
|
3
|
+
*
|
|
4
|
+
* Заменяет имя компонента в тексте.
|
|
5
|
+
* @param text text/ текст
|
|
6
|
+
* @param name component name/ имя компонента
|
|
7
|
+
* @param componentName new component name/ новое имя компонента
|
|
8
|
+
*/
|
|
9
|
+
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectItem, ObjectOrArray } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Merge one or more arrays recursively.
|
|
4
|
+
*
|
|
5
|
+
* Рекурсивное слияние одного или более массивов.
|
|
6
|
+
* @param array the array in which elements are replaced/ массив, элементы которого будут заменены
|
|
7
|
+
* @param replacement arrays from which elements will be extracted/ массивы, из которых будут браться элементы для замены
|
|
8
|
+
* @param isMerge merge one or more arrays/ сливает один или большее количество массивов
|
|
9
|
+
* @returns merged object/ объединенный объект
|
|
10
|
+
*/
|
|
11
|
+
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionReturn } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Replacing the value from replaces in value.
|
|
4
|
+
*
|
|
5
|
+
* Замена значения из replaces в value.
|
|
6
|
+
* @param value template string/ строка шаблона
|
|
7
|
+
* @param replaces object with data for replacement/ объект с данными для замены
|
|
8
|
+
* @returns replaced string/ замененная строка
|
|
9
|
+
*/
|
|
10
|
+
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
* @returns base64 image string or undefined / строка base64 изображения или undefined
|
|
17
|
+
*/
|
|
18
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts seconds into a time string.
|
|
3
|
+
*
|
|
4
|
+
* Преобразовывает секунды в строку с временем.
|
|
5
|
+
* @param second specified seconds/ указанные секунды
|
|
6
|
+
* @param hasHour whether to include hours/ нужно ли указывать часы
|
|
7
|
+
* @returns string formatted time/ форматированная строка с временем
|
|
8
|
+
*/
|
|
9
|
+
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Modifies the value of an element identified by its key.
|
|
4
|
+
*
|
|
5
|
+
* Изменяет значение элемента, определенного ключом.
|
|
6
|
+
* @param element checked element/ проверяемый элемент
|
|
7
|
+
* @param index index at which we retrieve values/ индекс, по которому получаем значения
|
|
8
|
+
* @param value new value/ новое значение
|
|
9
|
+
* @returns modified element/ измененный элемент
|
|
10
|
+
*/
|
|
11
|
+
export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modifies data according to its type and settings.
|
|
3
|
+
*
|
|
4
|
+
* Изменяет данные в соответствии с их типом и настройками.
|
|
5
|
+
* @param selected base values/ базовые значения
|
|
6
|
+
* @param value new values/ новые значения
|
|
7
|
+
* @param multiple support for multiple values/ поддержка нескольких значений
|
|
8
|
+
* @param maxlength maximum values/ максимальные значения
|
|
9
|
+
* @param alwaysChange updating values in any case/ обновление значений при любом случае
|
|
10
|
+
* @param notEmpty do not make the values empty/ не делать значения пустыми
|
|
11
|
+
* @returns modified values/ измененные значения
|
|
12
|
+
*/
|
|
13
|
+
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
14
|
+
multiple?: boolean | undefined;
|
|
15
|
+
maxlength?: number | undefined;
|
|
16
|
+
alwaysChange?: boolean | undefined;
|
|
17
|
+
notEmpty?: boolean | undefined;
|
|
18
|
+
}): T | T[] | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pause execution for a specified number of milliseconds.
|
|
3
|
+
*
|
|
4
|
+
* Приостановить выполнение на указанное количество миллисекунд.
|
|
5
|
+
* @param ms milliseconds/ миллисекунды
|
|
6
|
+
* @returns promise that resolves after delay/ промис, который разрешается после задержки
|
|
7
|
+
*/
|
|
8
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ObjectItem } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* This method is used to copy the values of all enumerable own properties from one source object to a target object.
|
|
4
|
+
* In priority according to the processing list.
|
|
5
|
+
*
|
|
6
|
+
* Метод используется для копирования значений всех перечисляемых свойств одного объекта в другой.
|
|
7
|
+
* В приоритете по списку обработки.
|
|
8
|
+
* @param array the target object/ целевой объект
|
|
9
|
+
* @param replacement the source object/ исходные объекты
|
|
10
|
+
* @param indexStart index at which to start changing the array/ индекс, по которому начинает изменять массив
|
|
11
|
+
* @returns modified array/ измененный массив
|
|
12
|
+
*/
|
|
13
|
+
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The method creates a string of length count, consisting of the characters value.
|
|
3
|
+
*
|
|
4
|
+
* Метод создает строку длиной count, состоящую из символов value.
|
|
5
|
+
* @param value character for filling/ символ для заполнения
|
|
6
|
+
* @param count length of the string/ длина строки
|
|
7
|
+
* @returns filled string/ заполненная строка
|
|
8
|
+
*/
|
|
9
|
+
export declare function strFill(value: string, count: number): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits a string by a separator, limited to a certain number of elements.
|
|
3
|
+
* If a limit is specified, the last element will contain the remainder of the string.
|
|
4
|
+
*
|
|
5
|
+
* Разделяет строку по разделителю, ограничивая количество элементов.
|
|
6
|
+
* Если указан лимит, последний элемент будет содержать остаток строки.
|
|
7
|
+
* @param value input value/ входное значение
|
|
8
|
+
* @param separator separator/ разделитель
|
|
9
|
+
* @param limit limit/ лимит
|
|
10
|
+
* @returns split array/ разделенный массив
|
|
11
|
+
*/
|
|
12
|
+
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует значение в массив.
|
|
3
|
+
* Если переданное значение уже является массивом, возвращается оно само.
|
|
4
|
+
* В противном случае значение оборачивается в массив.
|
|
5
|
+
*
|
|
6
|
+
* Converts a value to an array.
|
|
7
|
+
* If the value is already an array, it returns it as is.
|
|
8
|
+
* Otherwise, it wraps the value in an array.
|
|
9
|
+
*
|
|
10
|
+
* @param value - Значение, которое необходимо преобразовать в массив.
|
|
11
|
+
*
|
|
12
|
+
* The value to be converted into an array.
|
|
13
|
+
* @returns Массив, содержащий переданное значение.
|
|
14
|
+
*
|
|
15
|
+
* An array containing the provided value.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a String to Camel Case (+ first letter).
|
|
3
|
+
*
|
|
4
|
+
* Преобразование строки в Camel Case (+ первая буква).
|
|
5
|
+
* @param value input value/ входное значение
|
|
6
|
+
* @returns camel case string with first letter uppercase / строка в camel case с первой заглавной буквой
|
|
7
|
+
*/
|
|
8
|
+
export declare function toCamelCaseFirst(value: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует строку в формат kebab-case.
|
|
3
|
+
* Преобразует все заглавные буквы в строчные, заменяет пробелы и другие символы на дефисы.
|
|
4
|
+
*
|
|
5
|
+
* Converts a string to kebab-case.
|
|
6
|
+
* It converts uppercase letters to lowercase, replaces spaces and other characters with dashes.
|
|
7
|
+
*
|
|
8
|
+
* @param value - Строка, которую необходимо преобразовать.
|
|
9
|
+
*
|
|
10
|
+
* The string to be converted.
|
|
11
|
+
* @returns Строка в формате kebab-case.
|
|
12
|
+
*
|
|
13
|
+
* The string in kebab-case format.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toKebabCase(value: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NumberOrString } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a string or number to a finite floating-point number.
|
|
4
|
+
* Handles various separators (spaces, commas, dots) and strips non-numeric characters.
|
|
5
|
+
* Safe for use in SSR (Server-Side Rendering) environments.
|
|
6
|
+
*
|
|
7
|
+
* Преобразует строку или число в конечное число с плавающей точкой.
|
|
8
|
+
* Обрабатывает различные разделители (пробелы, запятые, точки) и удаляет нечисловые символы.
|
|
9
|
+
* Безопасно для использования в SSR (Server-Side Rendering) средах.
|
|
10
|
+
*
|
|
11
|
+
* @param value - The input value to convert / Входное значение для преобразования
|
|
12
|
+
* @returns The parsed number or 0 if conversion fails / Распарсенное число или 0, если конвертация не удалась
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* toNumber("1 234,56") // 1234.56
|
|
16
|
+
* toNumber("1,234.56") // 1234.56
|
|
17
|
+
* toNumber("1,234") // 1.234
|
|
18
|
+
*/
|
|
19
|
+
export declare function toNumber(value?: NumberOrString): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts the data into a number, taking into account the maximum permissible value.
|
|
3
|
+
*
|
|
4
|
+
* Преобразует данные в число с учетом максимально допустимого значения.
|
|
5
|
+
* @param value input value / входное значение
|
|
6
|
+
* @param max maximum achievable value / максимально достижимое значение
|
|
7
|
+
* @param formatting format the number / форматировать число
|
|
8
|
+
* @param language formatting language / язык форматирования
|
|
9
|
+
* @returns formatted number string or number/ форматированная строка числа или число
|
|
10
|
+
*/
|
|
11
|
+
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts values to percentages
|
|
3
|
+
*
|
|
4
|
+
* Преобразует значения в проценты
|
|
5
|
+
* @param maxValue maximum value/ максимальное значение
|
|
6
|
+
* @param value current value/ текущее значение
|
|
7
|
+
* @returns percentage value / значение в процентах
|
|
8
|
+
*/
|
|
9
|
+
export declare function toPercent(maxValue: number, value: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts values to percentages (three-digit)
|
|
3
|
+
*
|
|
4
|
+
* Преобразует значения в проценты (трёхзначный)
|
|
5
|
+
* @param maxValue maximum value/ максимальное значение
|
|
6
|
+
* @param value current value/ текущее значение
|
|
7
|
+
* @returns percentage value * 100 / значение в процентах * 100
|
|
8
|
+
*/
|
|
9
|
+
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts the given value to a string. Returns an empty string if the value is null or undefined.
|
|
3
|
+
*
|
|
4
|
+
* Преобразование значения в строку. Возвращает пустую строку, если значение равно null или undefined.
|
|
5
|
+
* @param value value for conversion / значение для преобразования
|
|
6
|
+
* @returns string representation of the value / строковое представление значения
|
|
7
|
+
*/
|
|
8
|
+
export declare function toString<T>(value: T): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует строку в соответствующий тип данных.
|
|
3
|
+
* В зависимости от содержания строки, она может быть преобразована в
|
|
4
|
+
* `undefined`, `null`, `true`, `false`, объект, число или функцию.
|
|
5
|
+
*
|
|
6
|
+
* Transforms a string into the corresponding data type.
|
|
7
|
+
* Based on the string content, it may be transformed into `undefined`,
|
|
8
|
+
* `null`, `true`, `false`, object, number, or function.
|
|
9
|
+
*
|
|
10
|
+
* @param value - Значение, которое необходимо преобразовать
|
|
11
|
+
*
|
|
12
|
+
* The value to be transformed
|
|
13
|
+
* @param isFunction - Флаг, который указывает, необходимо ли проверять функцию
|
|
14
|
+
* в глобальном объекте window
|
|
15
|
+
*
|
|
16
|
+
* A flag that indicates whether to check for a function in the global window object
|
|
17
|
+
* @returns Преобразованное значение
|
|
18
|
+
*
|
|
19
|
+
* The transformed value
|
|
20
|
+
*/
|
|
21
|
+
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
@@ -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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes duplicate entries in an array.
|
|
3
|
+
*
|
|
4
|
+
* Удаляет повторяющиеся записи в массиве.
|
|
5
|
+
* @param value input value/ входное значение
|
|
6
|
+
* @returns array without duplicates / массив без дубликатов
|
|
7
|
+
*/
|
|
8
|
+
export declare function uniqueArray<T>(value: T[]): T[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes data to the buffer.
|
|
3
|
+
*
|
|
4
|
+
* Записывает данные в буфер.
|
|
5
|
+
* @param text text for recording/ текст для записи
|
|
6
|
+
* @returns promise without return value / промис без возвращаемого значения
|
|
7
|
+
*/
|
|
8
|
+
export declare function writeClipboardData(text: string): Promise<void>;
|