@putkoff/abstract-utilities 0.1.223 → 0.1.225

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.
Files changed (95) hide show
  1. package/dist/cjs/index.js +101 -56
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/esm/index.js +86 -57
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.cjs +0 -0
  6. package/dist/index.cjs.map +0 -0
  7. package/dist/index.d.ts +29 -9
  8. package/dist/index.js +0 -0
  9. package/dist/index.js.map +0 -0
  10. package/dist/types/functions/auth_utils/imports.d.ts +0 -0
  11. package/dist/types/functions/auth_utils/index.d.ts +0 -0
  12. package/dist/types/functions/auth_utils/src/index.d.ts +0 -0
  13. package/dist/types/functions/auth_utils/src/token_utils.d.ts +0 -0
  14. package/dist/types/functions/config_utils/imports.d.ts +0 -0
  15. package/dist/types/functions/config_utils/index.d.ts +0 -0
  16. package/dist/types/functions/config_utils/src/config_utils.d.ts +0 -0
  17. package/dist/types/functions/config_utils/src/index.d.ts +0 -0
  18. package/dist/types/functions/constants_utils/index.d.ts +0 -0
  19. package/dist/types/functions/constants_utils/src/constants.d.ts +0 -0
  20. package/dist/types/functions/constants_utils/src/index.d.ts +0 -0
  21. package/dist/types/functions/env_utils/imports.d.ts +0 -0
  22. package/dist/types/functions/env_utils/index.d.ts +0 -0
  23. package/dist/types/functions/env_utils/src/index.d.ts +0 -0
  24. package/dist/types/functions/env_utils/src/window_utils.d.ts +0 -0
  25. package/dist/types/functions/fetch_utils/imports.d.ts +0 -0
  26. package/dist/types/functions/fetch_utils/index.d.ts +0 -0
  27. package/dist/types/functions/fetch_utils/src/fetch_utils.d.ts +0 -0
  28. package/dist/types/functions/fetch_utils/src/index.d.ts +0 -0
  29. package/dist/types/functions/fetch_utils/src/utils.d.ts +0 -0
  30. package/dist/types/functions/index.d.ts +1 -0
  31. package/dist/types/functions/math_utils/index.d.ts +1 -0
  32. package/dist/types/functions/math_utils/safe_math.d.ts +4 -0
  33. package/dist/types/functions/path_utils/imports.d.ts +0 -0
  34. package/dist/types/functions/path_utils/index.d.ts +0 -0
  35. package/dist/types/functions/path_utils/src/base_dirs.d.ts +0 -0
  36. package/dist/types/functions/path_utils/src/function_dirs.d.ts +0 -0
  37. package/dist/types/functions/path_utils/src/index.d.ts +0 -0
  38. package/dist/types/functions/path_utils/src/misc_dirs.d.ts +0 -0
  39. package/dist/types/functions/path_utils/src/path_utils.browser.d.ts +0 -0
  40. package/dist/types/functions/path_utils/src/path_utils.d.ts +0 -0
  41. package/dist/types/functions/path_utils/src/path_utils.node.d.ts +0 -0
  42. package/dist/types/functions/path_utils/src/paths.d.ts +0 -0
  43. package/dist/types/functions/path_utils/src/src_dirs.d.ts +0 -0
  44. package/dist/types/functions/read_utils/imports.d.ts +0 -0
  45. package/dist/types/functions/read_utils/index.d.ts +0 -0
  46. package/dist/types/functions/read_utils/src/index.d.ts +0 -0
  47. package/dist/types/functions/read_utils/src/read_utils.browser.d.ts +0 -0
  48. package/dist/types/functions/read_utils/src/utils.browser.d.ts +0 -0
  49. package/dist/types/functions/read_utils/src/utils.d.ts +0 -0
  50. package/dist/types/functions/rndm_utils/imports.d.ts +0 -0
  51. package/dist/types/functions/rndm_utils/index.d.ts +0 -0
  52. package/dist/types/functions/rndm_utils/src/index.d.ts +0 -0
  53. package/dist/types/functions/rndm_utils/src/utils.d.ts +0 -0
  54. package/dist/types/functions/safe_utils/imports.d.ts +0 -0
  55. package/dist/types/functions/safe_utils/index.d.ts +0 -0
  56. package/dist/types/functions/safe_utils/src/index.d.ts +0 -0
  57. package/dist/types/functions/safe_utils/src/safe_document.d.ts +0 -0
  58. package/dist/types/functions/safe_utils/src/safe_globals.d.ts +0 -0
  59. package/dist/types/functions/safe_utils/src/safe_storage.d.ts +0 -0
  60. package/dist/types/functions/safe_utils/src/safe_window.d.ts +0 -0
  61. package/dist/types/functions/string_utils/index.d.ts +0 -0
  62. package/dist/types/functions/string_utils/src/index.d.ts +0 -0
  63. package/dist/types/functions/string_utils/src/string_utils.d.ts +0 -0
  64. package/dist/types/functions/type_utils/imports.d.ts +0 -0
  65. package/dist/types/functions/type_utils/index.d.ts +0 -0
  66. package/dist/types/functions/type_utils/src/clean_utils.d.ts +3 -0
  67. package/dist/types/functions/type_utils/src/ensure_utils.d.ts +16 -0
  68. package/dist/types/functions/type_utils/src/index.d.ts +3 -0
  69. package/dist/types/functions/type_utils/src/json_utils.d.ts +2 -0
  70. package/dist/types/functions/type_utils/src/type_utils.d.ts +2 -11
  71. package/dist/types/functions/ui_utils/imports.d.ts +0 -0
  72. package/dist/types/functions/ui_utils/index.d.ts +0 -0
  73. package/dist/types/functions/ui_utils/src/button.d.ts +0 -0
  74. package/dist/types/functions/ui_utils/src/checkbox.d.ts +0 -0
  75. package/dist/types/functions/ui_utils/src/index.d.ts +0 -0
  76. package/dist/types/functions/ui_utils/src/input.d.ts +0 -0
  77. package/dist/types/functions/ui_utils/src/spinner.d.ts +0 -0
  78. package/dist/types/functions/variable_utils/imports.d.ts +0 -0
  79. package/dist/types/functions/variable_utils/index.d.ts +0 -0
  80. package/dist/types/functions/variable_utils/src/index.d.ts +0 -0
  81. package/dist/types/functions/variable_utils/src/variable_utils.d.ts +0 -0
  82. package/dist/types/index.d.ts +0 -0
  83. package/dist/types/types/index.d.ts +0 -0
  84. package/dist/types/types/src/ChangePassword.d.ts +0 -0
  85. package/dist/types/types/src/Files.d.ts +0 -0
  86. package/dist/types/types/src/index.d.ts +0 -0
  87. package/dist/types/types/src/login.d.ts +0 -0
  88. package/dist/types/types/src/logout.d.ts +0 -0
  89. package/dist/types/types/src/utils.d.ts +0 -0
  90. package/dist/types/utils/imports.d.ts +0 -0
  91. package/dist/types/utils/index.d.ts +0 -0
  92. package/dist/types/utils/src/Input.d.ts +0 -0
  93. package/dist/types/utils/src/config.d.ts +0 -0
  94. package/dist/types/utils/src/index.d.ts +0 -0
  95. package/package.json +1 -1
package/dist/index.cjs CHANGED
File without changes
File without changes
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 ensure_list<T>(obj: T | T[]): T[];
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 assureArray(input: string | string[]): any;
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
- declare function cleanText(input: any): any;
330
- declare function getCleanArray(obj: any): unknown[];
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 isType(obj: any, type: string): boolean;
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 | null;
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
- export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, assureArray, assureString, callStorage, callWindowMethod, capitalize, capitalize_str, checkResponse, cleanArray, cleanText, create_list_string, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, ensure_number, 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, safeGlobalProp, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
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 };
package/dist/index.js CHANGED
File without changes
package/dist/index.js.map CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -13,3 +13,4 @@ export * from './read_utils';
13
13
  export * from './safe_utils';
14
14
  export * from './read_utils';
15
15
  export * from './variable_utils';
16
+ export * from './math_utils';
@@ -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;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ export declare function cleanText(input: any): any;
2
+ export declare function cleanArray(obj: any): unknown[];
3
+ export declare function getCleanArray(obj: any): unknown[];
@@ -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 +1,4 @@
1
+ export * from './clean_utils';
2
+ export * from './ensure_utils';
3
+ export * from './json_utils';
1
4
  export * from './type_utils';
@@ -0,0 +1,2 @@
1
+ export declare function get_key_value<T extends object>(obj: T, key: string): any;
2
+ export declare function get<T extends object>(obj: T | null | undefined, keys: string | string[], defaultValue?: any): any;
@@ -1,16 +1,7 @@
1
- export declare function ensure_list<T>(obj: T | T[]): T[];
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 isType(obj: any, type: string): boolean;
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 | null;
15
7
  export declare function getAlphas(): string;
16
- export declare function getAlphaNum(obj: any): string | undefined;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putkoff/abstract-utilities",
3
- "version": "0.1.223",
3
+ "version": "0.1.225",
4
4
  "description": "Reusable abstract utility functions and components for both Node and React.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",