@putkoff/abstract-utilities 0.1.213 → 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/cjs/index.js CHANGED
@@ -1124,6 +1124,48 @@ function getCleanArray(obj) {
1124
1124
  const uniqueWords = cleanArray(obj);
1125
1125
  return uniqueWords;
1126
1126
  }
1127
+ function isStrInString(obj, string) {
1128
+ const obj_str = assureString(obj).toLowerCase;
1129
+ string = assureString(string).toLowerCase;
1130
+ if (string.includes(obj_str)) {
1131
+ return true;
1132
+ }
1133
+ return false;
1134
+ }
1135
+ function getChar(i, string) {
1136
+ if (string.length >= i) {
1137
+ return assureString(string)[i];
1138
+ }
1139
+ }
1140
+ function isType(obj, type) {
1141
+ if (typeof obj === type) {
1142
+ return true;
1143
+ }
1144
+ return false;
1145
+ }
1146
+ function getNums() {
1147
+ return '0123456789';
1148
+ }
1149
+ function isNum(obj) {
1150
+ const is_num = isType(obj, 'number');
1151
+ if (is_num) {
1152
+ return is_num;
1153
+ }
1154
+ return isStrInString(obj, getNums());
1155
+ }
1156
+ function getAlphas() {
1157
+ return 'abcdefghijklmnopqrstuvwxyz';
1158
+ }
1159
+ function getAlphaNum(obj) {
1160
+ const is_num = isNum(obj);
1161
+ const alphas = getAlphas();
1162
+ if (is_num) {
1163
+ return getChar(obj, alphas);
1164
+ }
1165
+ if (isStrInString(obj, alphas)) {
1166
+ return getChar(obj, alphas);
1167
+ }
1168
+ }
1127
1169
 
1128
1170
  function getSubstring(obj, maxLength = null, minLength = null) {
1129
1171
  const objLength = obj.length;
@@ -1667,9 +1709,12 @@ exports.geTypeUtilsDirectory = geTypeUtilsDirectory;
1667
1709
  exports.get = get;
1668
1710
  exports.getAbsDir = getAbsDir;
1669
1711
  exports.getAbsPath = getAbsPath;
1712
+ exports.getAlphaNum = getAlphaNum;
1713
+ exports.getAlphas = getAlphas;
1670
1714
  exports.getAuthorizationHeader = getAuthorizationHeader;
1671
1715
  exports.getBaseDir = getBaseDir;
1672
1716
  exports.getBody = getBody;
1717
+ exports.getChar = getChar;
1673
1718
  exports.getCleanArray = getCleanArray;
1674
1719
  exports.getComponentsUtilsDirectory = getComponentsUtilsDirectory;
1675
1720
  exports.getConfigContent = getConfigContent;
@@ -1688,6 +1733,7 @@ exports.getHooksUtilsDirectory = getHooksUtilsDirectory;
1688
1733
  exports.getHtmlDirectory = getHtmlDirectory;
1689
1734
  exports.getLibUtilsDirectory = getLibUtilsDirectory;
1690
1735
  exports.getMethod = getMethod;
1736
+ exports.getNums = getNums;
1691
1737
  exports.getPublicDir = getPublicDir;
1692
1738
  exports.getResult = getResult;
1693
1739
  exports.getSafeDocument = getSafeDocument;
@@ -1712,7 +1758,10 @@ exports.get_window_location = get_window_location;
1712
1758
  exports.get_window_parts = get_window_parts;
1713
1759
  exports.get_window_pathname = get_window_pathname;
1714
1760
  exports.isLoggedIn = isLoggedIn;
1761
+ exports.isNum = isNum;
1762
+ exports.isStrInString = isStrInString;
1715
1763
  exports.isTokenExpired = isTokenExpired;
1764
+ exports.isType = isType;
1716
1765
  exports.make_path = make_path;
1717
1766
  exports.make_sanitized_path = make_sanitized_path;
1718
1767
  exports.normalizeUrl = normalizeUrl;