@putkoff/abstract-utilities 0.1.224 → 0.1.226
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/cjs/index.js +101 -56
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +86 -57
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +29 -9
- package/dist/types/functions/index.d.ts +1 -0
- package/dist/types/functions/math_utils/index.d.ts +1 -0
- package/dist/types/functions/math_utils/safe_math.d.ts +4 -0
- package/dist/types/functions/type_utils/src/clean_utils.d.ts +3 -0
- package/dist/types/functions/type_utils/src/ensure_utils.d.ts +16 -0
- package/dist/types/functions/type_utils/src/index.d.ts +3 -0
- package/dist/types/functions/type_utils/src/json_utils.d.ts +2 -0
- package/dist/types/functions/type_utils/src/type_utils.d.ts +2 -11
- package/package.json +1 -1
- package/dist/index.cjs +0 -5877
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -5762
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -320,22 +320,37 @@ declare function eatEnd(obj: string, endings?: string[]): string;
|
|
|
320
320
|
declare function tryParse(obj: any): any;
|
|
321
321
|
declare function create_list_string(array_obj: any): string;
|
|
322
322
|
|
|
323
|
-
declare function
|
|
324
|
-
declare function assureString(obj: any): string;
|
|
323
|
+
declare function cleanText(input: any): any;
|
|
325
324
|
declare function cleanArray(obj: any): unknown[];
|
|
326
|
-
declare function
|
|
325
|
+
declare function getCleanArray(obj: any): unknown[];
|
|
326
|
+
|
|
327
|
+
declare function ensure_list<T>(obj: T | T[]): T[];
|
|
328
|
+
declare function ensure_number(x: any): number;
|
|
329
|
+
declare function ensure_array(input: string | string[]): any;
|
|
330
|
+
declare function ensure_string(obj: any): string;
|
|
331
|
+
declare const assureList: typeof ensure_list;
|
|
332
|
+
declare const assureString: typeof ensure_string;
|
|
333
|
+
declare const assureNumber: typeof ensure_number;
|
|
334
|
+
declare const assureArray: typeof ensure_array;
|
|
335
|
+
declare const assure_list: typeof ensure_list;
|
|
336
|
+
declare const assure_string: typeof ensure_string;
|
|
337
|
+
declare const assure_number: typeof ensure_number;
|
|
338
|
+
declare const assure_array: typeof ensure_array;
|
|
339
|
+
declare const ensureList: typeof ensure_list;
|
|
340
|
+
declare const ensureString: typeof ensure_string;
|
|
341
|
+
declare const ensureNumber: typeof ensure_number;
|
|
342
|
+
declare const ensureArray: typeof ensure_array;
|
|
343
|
+
|
|
327
344
|
declare function get_key_value<T extends object>(obj: T, key: string): any;
|
|
328
345
|
declare function get<T extends object>(obj: T | null | undefined, keys: string | string[], defaultValue?: any): any;
|
|
329
|
-
|
|
330
|
-
declare function
|
|
346
|
+
|
|
347
|
+
declare function isType(obj: any, type: string): boolean;
|
|
331
348
|
declare function isStrInString(obj: any, string: any): boolean;
|
|
332
349
|
declare function getChar(i: number, string: any): string | undefined;
|
|
333
|
-
declare function
|
|
350
|
+
declare function getAlphaNum(obj: any): string | undefined;
|
|
334
351
|
declare function getNums(): string;
|
|
335
352
|
declare function isNum(obj: any): boolean;
|
|
336
|
-
declare function ensure_number(object: any): number;
|
|
337
353
|
declare function getAlphas(): string;
|
|
338
|
-
declare function getAlphaNum(obj: any): string | undefined;
|
|
339
354
|
|
|
340
355
|
declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
341
356
|
color?: 'gray' | 'green' | 'blue';
|
|
@@ -375,5 +390,10 @@ declare function processKeywords(keywords: string | string[]): string[];
|
|
|
375
390
|
*/
|
|
376
391
|
declare function get_keyword_string(keywords: any): string;
|
|
377
392
|
|
|
378
|
-
|
|
393
|
+
declare function safeNums(...args: Array<number | string | null | undefined>): number[];
|
|
394
|
+
declare function safeDivide(...args: Array<number | string | null | undefined>): number;
|
|
395
|
+
declare function safeMultiply(...args: Array<number | string | null | undefined>): number;
|
|
396
|
+
declare function roundPercentage(x: any): number;
|
|
397
|
+
|
|
398
|
+
export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, assureArray, assureList, assureNumber, assureString, assure_array, assure_list, assure_number, assure_string, callStorage, callWindowMethod, capitalize, capitalize_str, checkResponse, cleanArray, cleanText, create_list_string, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensureArray, ensureList, ensureNumber, ensureString, ensure_array, ensure_list, ensure_number, ensure_string, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAlphaNum, getAlphas, getAuthorizationHeader, getBaseDir, getBody, getChar, getCleanArray, getComponentsUtilsDirectory, getConfigContent, getConfigJson, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMethod, getNums, getPublicDir, getResult, getSafeDocument, getSafeLocalStorage, getSafeWindow, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, getWindowHost, getWindowProp, get_basename, get_dirname, get_extname, get_filename, get_key_value, get_keyword_string, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isLoggedIn, isNum, isStrInString, isTokenExpired, isType, make_path, make_sanitized_path, normalizeUrl, parseResult, processKeywords, readJsonFile, removeToken, requireToken, roundPercentage, safeDivide, safeGlobalProp, safeMultiply, safeNums, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
|
|
379
399
|
export type { ApiRow, AppConfig, ChangePasswordFormProps, ChangePasswordProps, FetchVariables, FileItem, FileListResponse, InputProps, JwtPayload, LoginFormProps, LoginProps, LogoutButtonProps, Promise$1 as Promise, UrlKey };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './safe_math';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function safeNums(...args: Array<number | string | null | undefined>): number[];
|
|
2
|
+
export declare function safeDivide(...args: Array<number | string | null | undefined>): number;
|
|
3
|
+
export declare function safeMultiply(...args: Array<number | string | null | undefined>): number;
|
|
4
|
+
export declare function roundPercentage(x: any): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function ensure_list<T>(obj: T | T[]): T[];
|
|
2
|
+
export declare function ensure_number(x: any): number;
|
|
3
|
+
export declare function ensure_array(input: string | string[]): any;
|
|
4
|
+
export declare function ensure_string(obj: any): string;
|
|
5
|
+
export declare const assureList: typeof ensure_list;
|
|
6
|
+
export declare const assureString: typeof ensure_string;
|
|
7
|
+
export declare const assureNumber: typeof ensure_number;
|
|
8
|
+
export declare const assureArray: typeof ensure_array;
|
|
9
|
+
export declare const assure_list: typeof ensure_list;
|
|
10
|
+
export declare const assure_string: typeof ensure_string;
|
|
11
|
+
export declare const assure_number: typeof ensure_number;
|
|
12
|
+
export declare const assure_array: typeof ensure_array;
|
|
13
|
+
export declare const ensureList: typeof ensure_list;
|
|
14
|
+
export declare const ensureString: typeof ensure_string;
|
|
15
|
+
export declare const ensureNumber: typeof ensure_number;
|
|
16
|
+
export declare const ensureArray: typeof ensure_array;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
export declare function assureString(obj: any): string;
|
|
3
|
-
export declare function cleanArray(obj: any): unknown[];
|
|
4
|
-
export declare function assureArray(input: string | string[]): any;
|
|
5
|
-
export declare function get_key_value<T extends object>(obj: T, key: string): any;
|
|
6
|
-
export declare function get<T extends object>(obj: T | null | undefined, keys: string | string[], defaultValue?: any): any;
|
|
7
|
-
export declare function cleanText(input: any): any;
|
|
8
|
-
export declare function getCleanArray(obj: any): unknown[];
|
|
1
|
+
export declare function isType(obj: any, type: string): boolean;
|
|
9
2
|
export declare function isStrInString(obj: any, string: any): boolean;
|
|
10
3
|
export declare function getChar(i: number, string: any): string | undefined;
|
|
11
|
-
export declare function
|
|
4
|
+
export declare function getAlphaNum(obj: any): string | undefined;
|
|
12
5
|
export declare function getNums(): string;
|
|
13
6
|
export declare function isNum(obj: any): boolean;
|
|
14
|
-
export declare function ensure_number(object: any): number;
|
|
15
7
|
export declare function getAlphas(): string;
|
|
16
|
-
export declare function getAlphaNum(obj: any): string | undefined;
|
package/package.json
CHANGED