@putkoff/abstract-utilities 1.0.47 → 1.0.52

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 (94) hide show
  1. package/dist/cjs/index.js +285 -98
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/esm/index.js +257 -98
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.d.ts +83 -50
  6. package/dist/types/functions/auth_utils/imports.d.ts +0 -0
  7. package/dist/types/functions/auth_utils/index.d.ts +0 -0
  8. package/dist/types/functions/auth_utils/src/index.d.ts +0 -0
  9. package/dist/types/functions/auth_utils/src/token_utils.d.ts +0 -0
  10. package/dist/types/functions/config_utils/imports.d.ts +0 -0
  11. package/dist/types/functions/config_utils/index.d.ts +0 -0
  12. package/dist/types/functions/config_utils/src/config_utils.d.ts +0 -0
  13. package/dist/types/functions/config_utils/src/index.d.ts +0 -0
  14. package/dist/types/functions/constants_utils/index.d.ts +0 -0
  15. package/dist/types/functions/constants_utils/src/constants.d.ts +0 -0
  16. package/dist/types/functions/constants_utils/src/index.d.ts +0 -0
  17. package/dist/types/functions/env_utils/imports.d.ts +0 -0
  18. package/dist/types/functions/env_utils/index.d.ts +0 -0
  19. package/dist/types/functions/env_utils/src/index.d.ts +0 -0
  20. package/dist/types/functions/env_utils/src/window_utils.d.ts +0 -0
  21. package/dist/types/functions/fetch_utils/imports.d.ts +0 -0
  22. package/dist/types/functions/fetch_utils/index.d.ts +0 -0
  23. package/dist/types/functions/fetch_utils/src/fetch_utils.d.ts +0 -0
  24. package/dist/types/functions/fetch_utils/src/index.d.ts +0 -0
  25. package/dist/types/functions/fetch_utils/src/url_utils.d.ts +1 -0
  26. package/dist/types/functions/fetch_utils/src/utils.d.ts +0 -0
  27. package/dist/types/functions/index.d.ts +0 -0
  28. package/dist/types/functions/math_utils/constants.d.ts +0 -0
  29. package/dist/types/functions/math_utils/conversions.d.ts +0 -0
  30. package/dist/types/functions/math_utils/index.d.ts +0 -0
  31. package/dist/types/functions/math_utils/safe_math.d.ts +0 -0
  32. package/dist/types/functions/math_utils/scaleInterfaces.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.d.ts +42 -6
  40. package/dist/types/functions/path_utils/src/paths.d.ts +0 -0
  41. package/dist/types/functions/path_utils/src/src_dirs.d.ts +0 -0
  42. package/dist/types/functions/read_utils/imports.d.ts +0 -0
  43. package/dist/types/functions/read_utils/index.d.ts +0 -0
  44. package/dist/types/functions/read_utils/src/index.d.ts +0 -0
  45. package/dist/types/functions/read_utils/src/utils.d.ts +0 -0
  46. package/dist/types/functions/rndm_utils/imports.d.ts +0 -0
  47. package/dist/types/functions/rndm_utils/index.d.ts +0 -0
  48. package/dist/types/functions/rndm_utils/src/index.d.ts +0 -0
  49. package/dist/types/functions/rndm_utils/src/utils.d.ts +0 -0
  50. package/dist/types/functions/safe_utils/imports.d.ts +0 -0
  51. package/dist/types/functions/safe_utils/index.d.ts +0 -0
  52. package/dist/types/functions/safe_utils/src/index.d.ts +0 -0
  53. package/dist/types/functions/safe_utils/src/safe_document.d.ts +0 -0
  54. package/dist/types/functions/safe_utils/src/safe_globals.d.ts +0 -0
  55. package/dist/types/functions/safe_utils/src/safe_storage.d.ts +0 -0
  56. package/dist/types/functions/safe_utils/src/safe_window.d.ts +0 -0
  57. package/dist/types/functions/string_utils/index.d.ts +0 -0
  58. package/dist/types/functions/string_utils/src/index.d.ts +0 -0
  59. package/dist/types/functions/string_utils/src/string_utils.d.ts +12 -28
  60. package/dist/types/functions/type_utils/imports.d.ts +0 -0
  61. package/dist/types/functions/type_utils/index.d.ts +0 -0
  62. package/dist/types/functions/type_utils/src/clean_utils.d.ts +0 -0
  63. package/dist/types/functions/type_utils/src/ensure_utils.d.ts +22 -14
  64. package/dist/types/functions/type_utils/src/imports.d.ts +0 -0
  65. package/dist/types/functions/type_utils/src/index.d.ts +0 -0
  66. package/dist/types/functions/type_utils/src/json_utils.d.ts +0 -0
  67. package/dist/types/functions/type_utils/src/list_utils.d.ts +4 -0
  68. package/dist/types/functions/type_utils/src/mime_utils.d.ts +0 -0
  69. package/dist/types/functions/type_utils/src/type_utils.d.ts +0 -0
  70. package/dist/types/functions/ui_utils/imports.d.ts +0 -0
  71. package/dist/types/functions/ui_utils/index.d.ts +0 -0
  72. package/dist/types/functions/ui_utils/src/button.d.ts +0 -0
  73. package/dist/types/functions/ui_utils/src/checkbox.d.ts +0 -0
  74. package/dist/types/functions/ui_utils/src/index.d.ts +0 -0
  75. package/dist/types/functions/ui_utils/src/input.d.ts +0 -0
  76. package/dist/types/functions/ui_utils/src/spinner.d.ts +0 -0
  77. package/dist/types/functions/variable_utils/imports.d.ts +0 -0
  78. package/dist/types/functions/variable_utils/index.d.ts +0 -0
  79. package/dist/types/functions/variable_utils/src/index.d.ts +0 -0
  80. package/dist/types/functions/variable_utils/src/variable_utils.d.ts +0 -0
  81. package/dist/types/index.d.ts +0 -0
  82. package/dist/types/types/index.d.ts +0 -0
  83. package/dist/types/types/src/ChangePassword.d.ts +0 -0
  84. package/dist/types/types/src/Files.d.ts +0 -0
  85. package/dist/types/types/src/index.d.ts +0 -0
  86. package/dist/types/types/src/login.d.ts +0 -0
  87. package/dist/types/types/src/logout.d.ts +0 -0
  88. package/dist/types/types/src/utils.d.ts +0 -0
  89. package/dist/types/utils/imports.d.ts +0 -0
  90. package/dist/types/utils/index.d.ts +0 -0
  91. package/dist/types/utils/src/Input.d.ts +0 -0
  92. package/dist/types/utils/src/config.d.ts +0 -0
  93. package/dist/types/utils/src/index.d.ts +0 -0
  94. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -247,10 +247,11 @@ declare function path_to_url(filePath: string, all_paths: any): string | null;
247
247
  * It checks against the known URL prefixes in all_paths and replaces the matching base.
248
248
  */
249
249
  declare function url_to_path(urlStr: string, all_paths: any): string | null;
250
+ declare function urljoin(...parts: (string | undefined | null)[]): string;
250
251
 
251
252
  declare function get_dirname(filePath: string | null): string;
252
253
  declare function get_basename(filePath: string | null): string;
253
- declare function get_filename(file_path: string): string;
254
+ declare function get_filename(filePath: string): string;
254
255
  declare function get_extname(filePath: string | null): string;
255
256
  declare function get_splitext(filePath: string | null): {
256
257
  filename: string;
@@ -271,16 +272,52 @@ declare function get_splitext(filePath: string | null): {
271
272
  */
272
273
  declare function get_relative_path(basePath: string, targetPath: string): string;
273
274
  /**
274
- * Join multiple path segments, normalizing leading/trailing slashes.
275
+ * Join multiple path segments — clean, predictable, bulletproof.
275
276
  *
276
- * Usage:
277
- * make_path('/foo','bar','baz')
278
- * make_path(['/foo','bar','baz'])
277
+ * Accepts ANYTHING that ensure_list can handle:
278
+ * 'a,b,c'
279
+ * ['a', 'b,c']
280
+ * • 'a/b/c'
281
+ * • '/a/', 'b//c'
282
+ * • mixed arrays, comma strings, whatever
283
+ *
284
+ * Always returns a clean POSIX path string. Never a list.
279
285
  */
280
- declare function make_path(...paths: Array<string | string[]>): string;
286
+ declare function make_path(...parts: any[]): string;
281
287
  declare function sanitizeFilename(filename: string): string;
282
288
  declare function make_sanitized_path(...paths: string[]): string;
283
289
  declare function normalizeUrl(base: string, p?: string): string;
290
+ declare function pathjoin(...parts: any[]): string;
291
+ declare function pathJoin(...parts: any[]): string;
292
+ declare function makepath(...parts: any[]): string;
293
+ declare function makePath(...parts: any[]): string;
294
+ declare function path_join(...parts: any[]): string;
295
+ declare function getSplitext(filePath: string | null): {
296
+ filename: string;
297
+ extname: string;
298
+ ext?: undefined;
299
+ } | {
300
+ filename: string;
301
+ ext: string;
302
+ extname?: undefined;
303
+ };
304
+ declare function getsplitext(filePath: string | null): {
305
+ filename: string;
306
+ extname: string;
307
+ ext?: undefined;
308
+ } | {
309
+ filename: string;
310
+ ext: string;
311
+ extname?: undefined;
312
+ };
313
+ declare function getextname(filePath: string | null): string;
314
+ declare function getExtname(filePath: string | null): string;
315
+ declare function getfilename(filePath: string): string;
316
+ declare function getFilename(filePath: string): string;
317
+ declare function getbasename(filePath: string | null): string;
318
+ declare function getBasename(filePath: string | null): string;
319
+ declare function getdirname(filePath: string | null): string;
320
+ declare function getDirname(filePath: string | null): string;
284
321
 
285
322
  /**
286
323
  * Returns the absolute path of the current file.
@@ -323,36 +360,20 @@ declare function truncateString(obj: string, maxLength?: number): string;
323
360
  declare function capitalize_str(string: any): string;
324
361
  declare function capitalize(string: any): string;
325
362
  declare function stripPrefixes(str: string, bases?: string | string[]): string;
326
- /**
327
- * Removes characters from the beginning of the string
328
- * if they are found in the list of characters.
329
- *
330
- * @param str - The input string.
331
- * @param listObjects - A string or an array of characters to remove.
332
- * @returns The modified string.
333
- */
334
- declare function eatInner(str: string, listObjects: string | string[]): string;
335
- /**
336
- * Removes characters from the end of the string
337
- * if they are found in the list of characters.
338
- *
339
- * @param str - The input string.
340
- * @param listObjects - A string or an array of characters to remove.
341
- * @returns The modified string.
342
- */
343
- declare function eatOuter(str: string, listObjects: string | string[]): string;
344
- /**
345
- * Removes characters from both the beginning and the end of the string
346
- * if they are found in the list of characters.
347
- *
348
- * @param str - The input string.
349
- * @param listObjects - A string or an array of characters to remove.
350
- * @returns The modified string.
351
- */
352
- declare function eatAll(str: string, listObjects: string | string[]): string;
353
- declare function eatEnd(obj: string, endings?: string[]): string;
363
+ declare function tryEatPrefix(str: string, length: number, ...objs: any[]): [string, boolean];
364
+ /** Python-equivalent eatInner */
365
+ declare function eatInner(str: any, listObjects: any): string;
366
+ /** Python-equivalent eatOuter */
367
+ declare function eatOuter(str: any, listObjects: any): string;
368
+ /** Python-equivalent eatAll */
369
+ declare function eatAll(str: any, listObjects: any): string;
370
+ /** Python-equivalent eatElse */
371
+ declare function eatElse(stringObj: any, chars?: any, ints?: boolean, alpha?: boolean, lower?: boolean, capitalize?: boolean, string?: boolean, listObj?: boolean): string;
354
372
  declare function tryParse(obj: any): any;
355
373
  declare function create_list_string(array_obj: any): string;
374
+ declare function eatall(str: any, listObjects: any): string;
375
+ declare function eatinner(str: any, listObjects: any): string;
376
+ declare function eatouter(str: any, listObjects: any): string;
356
377
 
357
378
  declare function safeNums(...args: Array<number | string | null | undefined>): number[];
358
379
  declare function safeDivide(...args: Array<number | string | null | undefined>): number;
@@ -454,6 +475,10 @@ type CanonDist = "m" | "km" | "mi" | "ft";
454
475
  type CanonTime = "s" | "min" | "h" | "day";
455
476
  type DistanceUnit = "m" | "meter" | "meters" | "km" | "kms" | "kilometer" | "kilometers" | "mi" | "mile" | "miles" | "ft" | "foot" | "feet" | "f";
456
477
  type TimeUnit = "s" | "sec" | "second" | "seconds" | "min" | "m" | "minute" | "minutes" | "h" | "hr" | "hour" | "hours" | "day" | "d" | "days";
478
+ interface VelocityUnit {
479
+ D: DistanceUnit;
480
+ T: TimeUnit;
481
+ }
457
482
  interface OutDistance {
458
483
  d: number;
459
484
  D?: DistanceUnit;
@@ -547,22 +572,30 @@ declare function cleanArray(obj: any): unknown[];
547
572
  declare function getCleanArray(obj: any): unknown[];
548
573
  declare function formatNumber<T>(value: T): string | T;
549
574
 
550
- declare function ensure_list<T>(obj: T | T[]): T[];
575
+ declare function ensure_list(obj: any): any[];
551
576
  declare function ensure_number(x: any): number;
552
- declare function ensure_array(input: string | string[]): any;
553
577
  declare function ensure_string(obj: any): string;
554
- declare const assureList: typeof ensure_list;
555
- declare const assureString: typeof ensure_string;
556
- declare const assureNumber: typeof ensure_number;
557
- declare const assureArray: typeof ensure_array;
558
- declare const assure_list: typeof ensure_list;
559
- declare const assure_string: typeof ensure_string;
560
- declare const assure_number: typeof ensure_number;
561
- declare const assure_array: typeof ensure_array;
562
- declare const ensureList: typeof ensure_list;
563
- declare const ensureString: typeof ensure_string;
564
- declare const ensureNumber: typeof ensure_number;
565
- declare const ensureArray: typeof ensure_array;
578
+ declare function ensurelist(obj: any): any[];
579
+ declare function assureList(obj: any): any[];
580
+ declare function assure_list(obj: any): any[];
581
+ declare function ensureList(obj: any): any[];
582
+ declare function assurelist(obj: any): any[];
583
+ declare function ensurenumber(x: any): number;
584
+ declare function assureNumber(x: any): number;
585
+ declare function ensureNumber(x: any): number;
586
+ declare function assurenumber(x: any): number;
587
+ declare function assure_number(x: any): number;
588
+ declare function ensurestring(obj: any): string;
589
+ declare function ensureString(obj: any): string;
590
+ declare function assureString(obj: any): string;
591
+ declare function assurestring(obj: any): string;
592
+ declare function assure_string(obj: any): string;
593
+ declare function assurearray(obj: any): any[];
594
+ declare function ensurearray(obj: any): any[];
595
+ declare function ensure_array(obj: any): any[];
596
+ declare function ensureArray(obj: any): any[];
597
+ declare function assure_array(obj: any): any[];
598
+ declare function assureArray(obj: any): any[];
566
599
 
567
600
  declare function get_key_value<T extends object>(obj: T, key: string): any;
568
601
  declare function get<T extends object>(obj: T | null | undefined, keys: string | string[], defaultValue?: any): any;
@@ -789,5 +822,5 @@ declare function processKeywords(keywords: string | string[]): string[];
789
822
  */
790
823
  declare function get_keyword_string(keywords: any): string;
791
824
 
792
- export { API_PREFIX, ATTOSECOND, BASE_URL, Button, CENTISECOND, Checkbox, DAY, DAY_IN_S, DECISECOND, DEV_PREFIX, DIST_ALIASES, DIST_FACTORS, DOMAIN_NAME, DistanceConverter, FEET_PER_METER, FEMTOSECOND, HOUR, HOUR_IN_S, Input, KMS_PER_METER, MEDIA_TYPES, METERS_PER_FOOT, METERS_PER_KM, METERS_PER_MILE, MICROSECOND, MILES_PER_METER, MILISECOND, MIME_TYPES, MINUTE, MIN_IN_S, MONTH, MONTH_IN_S, MPerS_TO_MiPerH, MiPerH_TO_MPerS, NANOSECOND, PI, PI2, PICOSECOND, PROD_PREFIX, PROTOCOL, SECOND, SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, SUB_DIR, SpeedConverter, Spinner, TIME_ALIASES, TIME_FACTORS, TimeConverter, YEAR, YEAR_IN_S, ZEPTOSECOND, alertit, assureArray, assureList, assureNumber, assureString, assure_array, assure_list, assure_number, assure_string, callStorage, callWindowMethod, canonDist, canonTime, capitalize, capitalize_str, checkResponse, cleanArray, cleanText, confirmType, confirm_type, convertDistance, convertSpeed, convertTime, create_list_string, currentUsername, currentUsernames, decodeJwt, distanceToMeters, eatAll, eatEnd, eatInner, eatOuter, ensureArray, ensureList, ensureNumber, ensureString, ensure_array, ensure_list, ensure_number, ensure_string, exponential, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, fmt, formatNumber, fromMeters, fromMps, fromSeconds, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAllFileTypes, getAllFileTypesSync, getAlphaNum, getAlphas, getAuthorizationHeader, getBaseDir, getBody, getChar, getCleanArray, getComponentsUtilsDirectory, getConfig, getConfigContent, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMediaExts, getMediaMap, getMethod, getMimeType, getNums, getPublicDir, getResult, getSafeDocument, getSafeLocalStorage, getSafeWindow, getSchemasDirPath, getSchemasPath, getSrcDir, getSubstring, getToken, getWindowHost, getWindowProp, get_all_file_types, get_basename, get_dirname, get_extname, get_filename, get_full_path, get_full_url, get_key_value, get_keyword_string, get_media_exts, get_media_map, get_mime_type, get_relative_path, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, isFiniteNum, isLoggedIn, isMediaType, isNum, isStrInString, isTokenExpired, isType, is_media_type, loadConfig, make_path, make_sanitized_path, metersToDistance, mpsToSpeed, normalizeUrl, parseResult, path_to_url, processKeywords, readJsonFile, removeToken, requireToken, roundPercentage, safeDivide, safeGlobalProp, safeMultiply, safeNums, safeStorage, sanitizeFilename, secondsToTime, speedToMps, stripPrefixes, timeToSeconds, toMeters, toSeconds, truncateString, tryParse, urlJoin, url_to_path, velocityFromMs, velocityToMs };
793
- export type { ApiRow, AppConfig, CanonDist, CanonTime, ChangePasswordFormProps, ChangePasswordProps, ConvertDistance, ConvertSpeed, ConvertTime, Day, DistanceUnit, FetchVariables, FileItem, FileListResponse, Foot, Hour, InputProps, JwtPayload, Kilometer, LoginFormProps, LoginProps, LogoutButtonProps, MediaCategory, MediaMap, MediaOptions, Meter, Mile, MimeByExt, Minute, OutDist, OutDistance, OutSpeed, OutSpeedType, OutSpeeds, OutTime, OutTimeType, OutTimes, Promise$1 as Promise, Second, StartVelIn, TargetAltIn, TargetVelIn, TimeUnit, UnitConverter, UrlKey };
825
+ export { API_PREFIX, ATTOSECOND, BASE_URL, Button, CENTISECOND, Checkbox, DAY, DAY_IN_S, DECISECOND, DEV_PREFIX, DIST_ALIASES, DIST_FACTORS, DOMAIN_NAME, DistanceConverter, FEET_PER_METER, FEMTOSECOND, HOUR, HOUR_IN_S, Input, KMS_PER_METER, MEDIA_TYPES, METERS_PER_FOOT, METERS_PER_KM, METERS_PER_MILE, MICROSECOND, MILES_PER_METER, MILISECOND, MIME_TYPES, MINUTE, MIN_IN_S, MONTH, MONTH_IN_S, MPerS_TO_MiPerH, MiPerH_TO_MPerS, NANOSECOND, PI, PI2, PICOSECOND, PROD_PREFIX, PROTOCOL, SECOND, SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, SUB_DIR, SpeedConverter, Spinner, TIME_ALIASES, TIME_FACTORS, TimeConverter, YEAR, YEAR_IN_S, ZEPTOSECOND, alertit, assureArray, assureList, assureNumber, assureString, assure_array, assure_list, assure_number, assure_string, assurearray, assurelist, assurenumber, assurestring, callStorage, callWindowMethod, canonDist, canonTime, capitalize, capitalize_str, checkResponse, cleanArray, cleanText, confirmType, confirm_type, convertDistance, convertSpeed, convertTime, create_list_string, currentUsername, currentUsernames, decodeJwt, distanceToMeters, eatAll, eatElse, eatInner, eatOuter, eatall, eatinner, eatouter, ensureArray, ensureList, ensureNumber, ensureString, ensure_array, ensure_list, ensure_number, ensure_string, ensurearray, ensurelist, ensurenumber, ensurestring, exponential, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, fmt, formatNumber, fromMeters, fromMps, fromSeconds, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAllFileTypes, getAllFileTypesSync, getAlphaNum, getAlphas, getAuthorizationHeader, getBaseDir, getBasename, getBody, getChar, getCleanArray, getComponentsUtilsDirectory, getConfig, getConfigContent, getConfigVar, getDbConfigsPath, getDirname, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getExtname, getFetchVars, getFilename, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMediaExts, getMediaMap, getMethod, getMimeType, getNums, getPublicDir, getResult, getSafeDocument, getSafeLocalStorage, getSafeWindow, getSchemasDirPath, getSchemasPath, getSplitext, getSrcDir, getSubstring, getToken, getWindowHost, getWindowProp, get_all_file_types, get_basename, get_dirname, get_extname, get_filename, get_full_path, get_full_url, get_key_value, get_keyword_string, get_media_exts, get_media_map, get_mime_type, get_relative_path, get_splitext, get_window, get_window_location, get_window_parts, get_window_pathname, getbasename, getdirname, getextname, getfilename, getsplitext, isFiniteNum, isLoggedIn, isMediaType, isNum, isStrInString, isTokenExpired, isType, is_media_type, loadConfig, makePath, make_path, make_sanitized_path, makepath, metersToDistance, mpsToSpeed, normalizeUrl, parseResult, pathJoin, path_join, path_to_url, pathjoin, processKeywords, readJsonFile, removeToken, requireToken, roundPercentage, safeDivide, safeGlobalProp, safeMultiply, safeNums, safeStorage, sanitizeFilename, secondsToTime, speedToMps, stripPrefixes, timeToSeconds, toMeters, toSeconds, truncateString, tryEatPrefix, tryParse, urlJoin, url_to_path, urljoin, velocityFromMs, velocityToMs };
826
+ export type { ApiRow, AppConfig, CanonDist, CanonTime, ChangePasswordFormProps, ChangePasswordProps, ConvertDistance, ConvertSpeed, ConvertTime, Day, DistanceUnit, FetchVariables, FileItem, FileListResponse, Foot, Hour, InputProps, JwtPayload, Kilometer, LoginFormProps, LoginProps, LogoutButtonProps, MediaCategory, MediaMap, MediaOptions, Meter, Mile, MimeByExt, Minute, OutDist, OutDistance, OutSpeed, OutSpeedType, OutSpeeds, OutTime, OutTimeType, OutTimes, Promise$1 as Promise, Second, StartVelIn, TargetAltIn, TargetVelIn, TimeUnit, UnitConverter, UrlKey, VelocityUnit };
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
@@ -21,3 +21,4 @@ export declare function path_to_url(filePath: string, all_paths: any): string |
21
21
  * It checks against the known URL prefixes in all_paths and replaces the matching base.
22
22
  */
23
23
  export declare function url_to_path(urlStr: string, all_paths: any): string | null;
24
+ export declare function urljoin(...parts: (string | undefined | null)[]): string;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -96,6 +96,10 @@ export type CanonDist = "m" | "km" | "mi" | "ft";
96
96
  export type CanonTime = "s" | "min" | "h" | "day";
97
97
  export type DistanceUnit = "m" | "meter" | "meters" | "km" | "kms" | "kilometer" | "kilometers" | "mi" | "mile" | "miles" | "ft" | "foot" | "feet" | "f";
98
98
  export type TimeUnit = "s" | "sec" | "second" | "seconds" | "min" | "m" | "minute" | "minutes" | "h" | "hr" | "hour" | "hours" | "day" | "d" | "days";
99
+ export interface VelocityUnit {
100
+ D: DistanceUnit;
101
+ T: TimeUnit;
102
+ }
99
103
  export interface OutDistance {
100
104
  d: number;
101
105
  D?: DistanceUnit;
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  export declare function get_dirname(filePath: string | null): string;
2
2
  export declare function get_basename(filePath: string | null): string;
3
- export declare function get_filename(file_path: string): string;
3
+ export declare function get_filename(filePath: string): string;
4
4
  export declare function get_extname(filePath: string | null): string;
5
5
  export declare function get_splitext(filePath: string | null): {
6
6
  filename: string;
@@ -21,13 +21,49 @@ export declare function get_splitext(filePath: string | null): {
21
21
  */
22
22
  export declare function get_relative_path(basePath: string, targetPath: string): string;
23
23
  /**
24
- * Join multiple path segments, normalizing leading/trailing slashes.
24
+ * Join multiple path segments — clean, predictable, bulletproof.
25
25
  *
26
- * Usage:
27
- * make_path('/foo','bar','baz')
28
- * make_path(['/foo','bar','baz'])
26
+ * Accepts ANYTHING that ensure_list can handle:
27
+ * 'a,b,c'
28
+ * ['a', 'b,c']
29
+ * • 'a/b/c'
30
+ * • '/a/', 'b//c'
31
+ * • mixed arrays, comma strings, whatever
32
+ *
33
+ * Always returns a clean POSIX path string. Never a list.
29
34
  */
30
- export declare function make_path(...paths: Array<string | string[]>): string;
35
+ export declare function make_path(...parts: any[]): string;
31
36
  export declare function sanitizeFilename(filename: string): string;
32
37
  export declare function make_sanitized_path(...paths: string[]): string;
33
38
  export declare function normalizeUrl(base: string, p?: string): string;
39
+ export declare function pathjoin(...parts: any[]): string;
40
+ export declare function pathJoin(...parts: any[]): string;
41
+ export declare function makepath(...parts: any[]): string;
42
+ export declare function makePath(...parts: any[]): string;
43
+ export declare function path_join(...parts: any[]): string;
44
+ export declare function getSplitext(filePath: string | null): {
45
+ filename: string;
46
+ extname: string;
47
+ ext?: undefined;
48
+ } | {
49
+ filename: string;
50
+ ext: string;
51
+ extname?: undefined;
52
+ };
53
+ export declare function getsplitext(filePath: string | null): {
54
+ filename: string;
55
+ extname: string;
56
+ ext?: undefined;
57
+ } | {
58
+ filename: string;
59
+ ext: string;
60
+ extname?: undefined;
61
+ };
62
+ export declare function getextname(filePath: string | null): string;
63
+ export declare function getExtname(filePath: string | null): string;
64
+ export declare function getfilename(filePath: string): string;
65
+ export declare function getFilename(filePath: string): string;
66
+ export declare function getbasename(filePath: string | null): string;
67
+ export declare function getBasename(filePath: string | null): string;
68
+ export declare function getdirname(filePath: string | null): string;
69
+ export declare function getDirname(filePath: string | null): string;
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
@@ -3,33 +3,17 @@ export declare function truncateString(obj: string, maxLength?: number): string;
3
3
  export declare function capitalize_str(string: any): string;
4
4
  export declare function capitalize(string: any): string;
5
5
  export declare function stripPrefixes(str: string, bases?: string | string[]): string;
6
- /**
7
- * Removes characters from the beginning of the string
8
- * if they are found in the list of characters.
9
- *
10
- * @param str - The input string.
11
- * @param listObjects - A string or an array of characters to remove.
12
- * @returns The modified string.
13
- */
14
- export declare function eatInner(str: string, listObjects: string | string[]): string;
15
- /**
16
- * Removes characters from the end of the string
17
- * if they are found in the list of characters.
18
- *
19
- * @param str - The input string.
20
- * @param listObjects - A string or an array of characters to remove.
21
- * @returns The modified string.
22
- */
23
- export declare function eatOuter(str: string, listObjects: string | string[]): string;
24
- /**
25
- * Removes characters from both the beginning and the end of the string
26
- * if they are found in the list of characters.
27
- *
28
- * @param str - The input string.
29
- * @param listObjects - A string or an array of characters to remove.
30
- * @returns The modified string.
31
- */
32
- export declare function eatAll(str: string, listObjects: string | string[]): string;
33
- export declare function eatEnd(obj: string, endings?: string[]): string;
6
+ export declare function tryEatPrefix(str: string, length: number, ...objs: any[]): [string, boolean];
7
+ /** Python-equivalent eatInner */
8
+ export declare function eatInner(str: any, listObjects: any): string;
9
+ /** Python-equivalent eatOuter */
10
+ export declare function eatOuter(str: any, listObjects: any): string;
11
+ /** Python-equivalent eatAll */
12
+ export declare function eatAll(str: any, listObjects: any): string;
13
+ /** Python-equivalent eatElse */
14
+ export declare function eatElse(stringObj: any, chars?: any, ints?: boolean, alpha?: boolean, lower?: boolean, capitalize?: boolean, string?: boolean, listObj?: boolean): string;
34
15
  export declare function tryParse(obj: any): any;
35
16
  export declare function create_list_string(array_obj: any): string;
17
+ export declare function eatall(str: any, listObjects: any): string;
18
+ export declare function eatinner(str: any, listObjects: any): string;
19
+ export declare function eatouter(str: any, listObjects: any): string;
File without changes
File without changes
@@ -1,16 +1,24 @@
1
- export declare function ensure_list<T>(obj: T | T[]): T[];
1
+ export declare function ensure_list(obj: any): any[];
2
2
  export declare function ensure_number(x: any): number;
3
- export declare function ensure_array(input: string | string[]): any;
4
3
  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;
4
+ export declare function ensurelist(obj: any): any[];
5
+ export declare function assureList(obj: any): any[];
6
+ export declare function assure_list(obj: any): any[];
7
+ export declare function ensureList(obj: any): any[];
8
+ export declare function assurelist(obj: any): any[];
9
+ export declare function ensurenumber(x: any): number;
10
+ export declare function assureNumber(x: any): number;
11
+ export declare function ensureNumber(x: any): number;
12
+ export declare function assurenumber(x: any): number;
13
+ export declare function assure_number(x: any): number;
14
+ export declare function ensurestring(obj: any): string;
15
+ export declare function ensureString(obj: any): string;
16
+ export declare function assureString(obj: any): string;
17
+ export declare function assurestring(obj: any): string;
18
+ export declare function assure_string(obj: any): string;
19
+ export declare function assurearray(obj: any): any[];
20
+ export declare function ensurearray(obj: any): any[];
21
+ export declare function ensure_array(obj: any): any[];
22
+ export declare function ensureArray(obj: any): any[];
23
+ export declare function assure_array(obj: any): any[];
24
+ export declare function assureArray(obj: any): any[];
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ export declare function smart_split(s: string): string[];
2
+ export declare function split_outside_brackets(s: string): string[];
3
+ export declare function smart_split_preserving_lists(s: string): string[];
4
+ export declare function parse_nested_list(s: string): any[];
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": "1.0.47",
3
+ "version": "1.0.52",
4
4
  "type": "module",
5
5
  "description": "A reusable React Login component with JWT authentication",
6
6
  "main": "dist/cjs/index.js",