@putkoff/abstract-utilities 0.1.209 → 0.1.211
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 +94 -59
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +92 -60
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/types/functions/auth_utils/src/token_utils.d.ts +1 -0
- package/dist/types/functions/string_utils/src/string_utils.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165,6 +165,7 @@ declare function getWindowHost(): string | undefined;
|
|
|
165
165
|
/** Read raw JWT from LocalStorage (or null if absent) */
|
|
166
166
|
declare function getToken(): string | null | any;
|
|
167
167
|
declare function isLoggedIn(): boolean;
|
|
168
|
+
declare function removeToken(): boolean;
|
|
168
169
|
/**
|
|
169
170
|
* Add a Bearer Authorization header.
|
|
170
171
|
* A shallow copy of headers is returned so callers can keep chaining.
|
|
@@ -285,6 +286,8 @@ declare function alertit(obj?: any): void;
|
|
|
285
286
|
|
|
286
287
|
declare function getSubstring(obj: string, maxLength?: number | null, minLength?: number | null): string;
|
|
287
288
|
declare function truncateString(obj: string, maxLength?: number): string;
|
|
289
|
+
declare function capitalize_str(string: any): string;
|
|
290
|
+
declare function capitalize(string: any): string;
|
|
288
291
|
declare function stripPrefixes(str: string, bases?: string | string[]): string;
|
|
289
292
|
/**
|
|
290
293
|
* Removes characters from the beginning of the string
|
|
@@ -364,5 +367,5 @@ declare function processKeywords(keywords: string | string[]): string[];
|
|
|
364
367
|
*/
|
|
365
368
|
declare function get_keyword_string(keywords: any): string;
|
|
366
369
|
|
|
367
|
-
export { API_PREFIX, BASE_URL, Button, Checkbox, DEV_PREFIX, DOMAIN_NAME, Input, PROD_PREFIX, PROTOCOL, SUB_DIR, Spinner, alertit, assureArray, assureString, callStorage, callWindowMethod, checkResponse, cleanArray, cleanText, create_list_string, currentUsername, currentUsernames, decodeJwt, eatAll, eatEnd, eatInner, eatOuter, ensure_list, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getCleanArray, getComponentsUtilsDirectory, getConfigContent, getConfigJson, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMethod, 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, isTokenExpired, make_path, make_sanitized_path, normalizeUrl, parseResult, processKeywords, readJsonFile, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
|
|
370
|
+
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, fetchIndexHtml, fetchIndexHtmlContainer, fetchIt, geAuthsUtilsDirectory, geBackupsUtilsDirectory, geConstantsUtilsDirectory, geEnvUtilsDirectory, geFetchUtilsDirectory, geFileUtilsDirectory, gePathUtilsDirectory, geStaticDirectory, geStringUtilsDirectory, geTypeUtilsDirectory, get, getAbsDir, getAbsPath, getAuthorizationHeader, getBaseDir, getBody, getCleanArray, getComponentsUtilsDirectory, getConfigContent, getConfigJson, getConfigVar, getDbConfigsPath, getDistDir, getDocumentProp, getEnvDir, getEnvPath, getFetchVars, getFunctionsDir, getFunctionsUtilsDirectory, getHeaders, getHooksUtilsDirectory, getHtmlDirectory, getLibUtilsDirectory, getMethod, 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, isTokenExpired, make_path, make_sanitized_path, normalizeUrl, parseResult, processKeywords, readJsonFile, removeToken, requireToken, safeGlobalProp, safeStorage, sanitizeFilename, stripPrefixes, truncateString, tryParse };
|
|
368
371
|
export type { ApiRow, AppConfig, ChangePasswordFormProps, ChangePasswordProps, FetchVariables, FileItem, FileListResponse, InputProps, JwtPayload, LoginFormProps, LoginProps, LogoutButtonProps, Promise$1 as Promise, UrlKey };
|
|
@@ -13,6 +13,7 @@ import type { JwtPayload } from './../imports';
|
|
|
13
13
|
/** Read raw JWT from LocalStorage (or null if absent) */
|
|
14
14
|
export declare function getToken(): string | null | any;
|
|
15
15
|
export declare function isLoggedIn(): boolean;
|
|
16
|
+
export declare function removeToken(): boolean;
|
|
16
17
|
/**
|
|
17
18
|
* Add a Bearer Authorization header.
|
|
18
19
|
* A shallow copy of headers is returned so callers can keep chaining.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare function getSubstring(obj: string, maxLength?: number | null, minLength?: number | null): string;
|
|
2
2
|
export declare function truncateString(obj: string, maxLength?: number): string;
|
|
3
|
+
export declare function capitalize_str(string: any): string;
|
|
4
|
+
export declare function capitalize(string: any): string;
|
|
3
5
|
export declare function stripPrefixes(str: string, bases?: string | string[]): string;
|
|
4
6
|
/**
|
|
5
7
|
* Removes characters from the beginning of the string
|