@putkoff/abstract-utilities 0.1.214 → 0.1.215
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/esm/index.js
CHANGED
|
@@ -1121,6 +1121,48 @@ function getCleanArray(obj) {
|
|
|
1121
1121
|
const uniqueWords = cleanArray(obj);
|
|
1122
1122
|
return uniqueWords;
|
|
1123
1123
|
}
|
|
1124
|
+
function isStrInString(obj, string) {
|
|
1125
|
+
const obj_str = assureString(obj).toLowerCase;
|
|
1126
|
+
string = assureString(string).toLowerCase;
|
|
1127
|
+
if (string.includes(obj_str)) {
|
|
1128
|
+
return true;
|
|
1129
|
+
}
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1132
|
+
function getChar(i, string) {
|
|
1133
|
+
if (string.length >= i) {
|
|
1134
|
+
return assureString(string)[i];
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
function isType(obj, type) {
|
|
1138
|
+
if (typeof obj === type) {
|
|
1139
|
+
return true;
|
|
1140
|
+
}
|
|
1141
|
+
return false;
|
|
1142
|
+
}
|
|
1143
|
+
function getNums() {
|
|
1144
|
+
return '0123456789';
|
|
1145
|
+
}
|
|
1146
|
+
function isNum(obj) {
|
|
1147
|
+
const is_num = isType(obj, 'number');
|
|
1148
|
+
if (is_num) {
|
|
1149
|
+
return is_num;
|
|
1150
|
+
}
|
|
1151
|
+
return isStrInString(obj, getNums());
|
|
1152
|
+
}
|
|
1153
|
+
function getAlphas() {
|
|
1154
|
+
return 'abcdefghijklmnopqrstuvwxyz';
|
|
1155
|
+
}
|
|
1156
|
+
function getAlphaNum(obj) {
|
|
1157
|
+
const is_num = isNum(obj);
|
|
1158
|
+
const alphas = getAlphas();
|
|
1159
|
+
if (is_num) {
|
|
1160
|
+
return getChar(obj, alphas);
|
|
1161
|
+
}
|
|
1162
|
+
if (isStrInString(obj, alphas)) {
|
|
1163
|
+
return getChar(obj, alphas);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1124
1166
|
|
|
1125
1167
|
function getSubstring(obj, maxLength = null, minLength = null) {
|
|
1126
1168
|
const objLength = obj.length;
|
|
@@ -1602,5 +1644,5 @@ function get_keyword_string(keywords) {
|
|
|
1602
1644
|
return allString;
|
|
1603
1645
|
}
|
|
1604
1646
|
|
|
1605
|
-
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 };
|
|
1647
|
+
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, 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 };
|
|
1606
1648
|
//# sourceMappingURL=index.js.map
|