@dxtmisha/functional-basic 1.8.0 → 1.8.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.8.1] - 2026-07-31
6
+
7
+ ### Added
8
+ - **ErrorCenter / ErrorCenterHandler**: Introduced `isConsole` property and `setIsConsole` method across `ErrorCenterHandler`, `ErrorCenterInstance`, and `ErrorCenter` to allow toggling or filtering console error logging via boolean or callback function `(cause: ErrorCenterCauseItem) => boolean`.
9
+ - **errorCenterTypes**: Exported `ErrorCenterHandlerIsConsole` and `ErrorCenterHandlerIsConsoleCallback` type definitions.
10
+
11
+ ### Changed
12
+ - **errorCenterTypes**: Renamed `src/types/errorCenter.ts` to `src/types/errorCenterTypes.ts` to adhere to the project `*Types.ts` file naming standard.
13
+ - **ErrorCenterHandler**: Refactored `toConsole` method to utilize `executeFunction` utility for evaluating `isConsole` and streamlined return control flow.
14
+ - **Documentation**: Updated `ai-doc.md` and `ai-doc.ru.md` with guidelines enforcing the use of primitive helper functions (`isFunction`, `executeFunction`, `isFilled`, etc.).
15
+
16
+ ### Fixed
17
+ - **sortList**: Fixed `ReferenceError: 'Intl' is not defined` in environments without `Intl` support (like the Figma plugin sandbox) by lazily instantiating `Intl.Collator` inside the function scope instead of the module's global scope, and implementing a safe fallback to `String.prototype.localeCompare`.
18
+
5
19
  ## [1.8.0] - 2026-07-25
6
20
 
7
21
  ### Added
package/ai-doc.md CHANGED
@@ -3,9 +3,10 @@
3
3
  Framework-agnostic utility library. **Vue developers MUST search `@dxtmisha/functional` first**; use this ONLY if no reactive/Vue-specific analog exists.
4
4
 
5
5
  ## 1. Coding Standards & Conventions
6
- - **Class Structure**: Properties/Variables (`public`->`protected`->`private`) -> Constructor -> Public Methods (Getters -> Setters -> Core actions) -> Protected Methods -> Private Methods.
6
+ - **Class Structure**: Properties/Variables (`public`->`protected`->`private`) -> Constructor -> Public Methods -> Protected Methods -> Private Methods. Within each method group, follow order: 1) `get` / `set` (getters/setters), 2) `is...` / `has...`, 3) `get...` / `set...`, 4) `add...` / `remove...`, 5) `update...` / `reset...`, 6) remaining methods. Within each subgroup, methods are grouped semantically by logical pairs and rules (e.g., `min` / `max`, `width` / `height`, `x` / `y` / `z`), and remaining methods are sorted alphabetically.
7
7
  - **Style/Types**: `PascalCase` classes, `camelCase` methods/props, `UPPER_SNAKE_CASE` constants. No `any` (use `unknown`/generics). Explicit return types for ALL methods. Export all interfaces. Type files: `*Types.ts`. Use `@effect/schema` for schemas.
8
8
  - **SSR Safety**: Isomorphic code. Do NOT store request state in globals. Use `isDomRuntime()` before `window`/`document`. Use `ServerStorage.get('key', () => new Class())` for request-isolated singletons.
9
+ - **Utility & Primitive Functions**: ALWAYS use primitive helper functions from this package (e.g. `isFunction`, `executeFunction`, `isFilled`, `isObject`, `isString`, `isArray`, etc.) instead of writing custom inline checks or conditions.
9
10
 
10
11
  ## 2. API Reference & Examples
11
12
 
@@ -44,7 +45,7 @@ const phone = GeoPhone.getByPhone('+84900000000'); const mask = GeoPhone.toMask(
44
45
 
45
46
  ### DOM, Events & Helpers
46
47
  ```typescript
47
- import { EventItem, goScrollSmooth, writeClipboardData, getClipboardData, SearchList, Formatters, FormattersType, isFilled, isDomRuntime, copyObject, anyToString, sleep } from '@dxtmisha/functional-basic';
48
+ import { EventItem, goScrollSmooth, writeClipboardData, getClipboardData, SearchList, Formatters, FormattersType, isFilled, isFunction, executeFunction, isDomRuntime, copyObject, anyToString, sleep } from '@dxtmisha/functional-basic';
48
49
 
49
50
  // Safe Events (leak-proof)
50
51
  const listener = new EventItem(window, 'click', console.log, { passive: true }); listener.start(); listener.stop();
@@ -58,5 +59,7 @@ const fmt = new Formatters({ p: { type: FormattersType.currency, options: 'USD'
58
59
 
59
60
  // General
60
61
  isFilled([]); // false (strings, arrays, objects, numbers, booleans)
62
+ executeFunction(callbackOrValue, arg1); // Executes callback if function, or returns value as is
63
+ isFunction(val); // Type-guard for functions
61
64
  isDomRuntime(); const cloned = copyObject({ a: 1 }); const str = anyToString(123); await sleep(500);
62
65
  ```
@@ -1,5 +1,5 @@
1
1
  import { ErrorCenterInstance } from './ErrorCenterInstance';
2
- import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerList } from '../types/errorCenter';
2
+ import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerIsConsole, ErrorCenterHandlerList } from '../types/errorCenterTypes';
3
3
  /**
4
4
  * Class for managing error storage and handling.
5
5
  *
@@ -69,6 +69,13 @@ export declare class ErrorCenter {
69
69
  * @param callback callback function / функция обратного вызова
70
70
  */
71
71
  static addCallback(callback: ErrorCenterHandlerCallback): void;
72
+ /**
73
+ * Sets console output flag or filter function.
74
+ *
75
+ * Устанавливает флаг или функцию фильтрации вывода в консоль.
76
+ * @param isConsole console output flag or filter function / флаг или функция вывода в консоль
77
+ */
78
+ static setIsConsole(isConsole: ErrorCenterHandlerIsConsole): void;
72
79
  /**
73
80
  * Triggers error handling for a group.
74
81
  *
@@ -1,4 +1,4 @@
1
- import { ErrorCenterCauseItem, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerItem, ErrorCenterHandlerList } from '../types/errorCenter';
1
+ import { ErrorCenterCauseItem, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerIsConsole, ErrorCenterHandlerItem, ErrorCenterHandlerList } from '../types/errorCenterTypes';
2
2
  /**
3
3
  * Class for managing and triggering error handlers.
4
4
  *
@@ -9,11 +9,14 @@ export declare class ErrorCenterHandler {
9
9
  protected handlers: ErrorCenterHandlerList;
10
10
  /** Callbacks executed on every error / Обратные вызовы, выполняемые при каждой ошибке */
11
11
  protected callbacks: ErrorCenterHandlerCallback[];
12
+ /** Console output flag or filter function / Флаг или функция фильтрации вывода в консоль */
13
+ protected isConsole: ErrorCenterHandlerIsConsole;
12
14
  /**
13
15
  * Constructor
14
16
  * @param handlers initial handlers list / начальный список обработчиков
17
+ * @param isConsole console output flag or filter function / флаг или функция вывода в консоль
15
18
  */
16
- constructor(handlers?: ErrorCenterHandlerList);
19
+ constructor(handlers?: ErrorCenterHandlerList, isConsole?: ErrorCenterHandlerIsConsole);
17
20
  /**
18
21
  * Checks if handlers exist for a group.
19
22
  *
@@ -55,6 +58,14 @@ export declare class ErrorCenterHandler {
55
58
  * @returns this instance / текущий экземпляр
56
59
  */
57
60
  addCallback(callback: ErrorCenterHandlerCallback): this;
61
+ /**
62
+ * Sets console output flag or filter function.
63
+ *
64
+ * Устанавливает флаг или функцию фильтрации вывода в консоль.
65
+ * @param isConsole console output flag or filter function / флаг или функция вывода в консоль
66
+ * @returns this instance / текущий экземпляр
67
+ */
68
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
58
69
  /**
59
70
  * Triggers handlers for a group and logs to console.
60
71
  *
@@ -1,5 +1,5 @@
1
1
  import { ErrorCenterHandler } from './ErrorCenterHandler';
2
- import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerList } from '../types/errorCenter';
2
+ import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerIsConsole, ErrorCenterHandlerList } from '../types/errorCenterTypes';
3
3
  /**
4
4
  * Class for managing error storage and handling within an instance.
5
5
  *
@@ -74,6 +74,14 @@ export declare class ErrorCenterInstance {
74
74
  * @returns this instance / текущий экземпляр
75
75
  */
76
76
  addCallback(callback: ErrorCenterHandlerCallback): this;
77
+ /**
78
+ * Sets console output flag or filter function for the handler.
79
+ *
80
+ * Устанавливает флаг или функцию фильтрации вывода в консоль для обработчика.
81
+ * @param isConsole console output flag or filter function / флаг или функция вывода в консоль
82
+ * @returns this instance / текущий экземпляр
83
+ */
84
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
77
85
  /**
78
86
  * Triggers error handling for a group.
79
87
  *
package/dist/library.d.ts CHANGED
@@ -180,7 +180,7 @@ export * from './functions/uniqueArray';
180
180
  export * from './functions/writeClipboardData';
181
181
  export * from './types/apiTypes';
182
182
  export * from './types/basicTypes';
183
- export * from './types/errorCenter';
183
+ export * from './types/errorCenterTypes';
184
184
  export * from './types/formattersTypes';
185
185
  export * from './types/geoTypes';
186
186
  export * from './types/metaTypes';
package/dist/library.js CHANGED
@@ -200,8 +200,8 @@ function w(e, t, n) {
200
200
  //#endregion
201
201
  //#region src/classes/ErrorCenterHandler.ts
202
202
  var le = class {
203
- constructor(e) {
204
- w(this, "handlers", []), w(this, "callbacks", []), e && this.addList(e);
203
+ constructor(e, t = !0) {
204
+ w(this, "handlers", []), w(this, "callbacks", []), w(this, "isConsole", !0), this.isConsole = t, e && this.addList(e);
205
205
  }
206
206
  has(e) {
207
207
  return !!this.get(e);
@@ -222,13 +222,16 @@ var le = class {
222
222
  addCallback(e) {
223
223
  return this.callbacks.push(e), this;
224
224
  }
225
+ setIsConsole(e) {
226
+ return this.isConsole = e, this;
227
+ }
225
228
  on(e) {
226
229
  var t;
227
230
  let n = (t = this.get(e.group)) == null ? this.get(void 0) : t;
228
231
  return n && n.handlers.forEach((t) => t(e)), this.callbacks.forEach((t) => t(e)), this.toConsole(e), this;
229
232
  }
230
233
  toConsole(e) {
231
- if (console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details: ", e.details), !s()) {
234
+ if (m(this.isConsole, e) && (console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details: ", e.details), !s())) {
232
235
  let e = (/* @__PURE__ */ Error()).stack;
233
236
  console.error("Error Center/trace: ", e);
234
237
  }
@@ -259,6 +262,9 @@ var le = class {
259
262
  addCallback(e) {
260
263
  return this.handler.addCallback(e), this;
261
264
  }
265
+ setIsConsole(e) {
266
+ return this.handler.setIsConsole(e), this;
267
+ }
262
268
  on(e) {
263
269
  return this.handler.on(this.assign(e)), this;
264
270
  }
@@ -452,6 +458,9 @@ var le = class {
452
458
  static addCallback(e) {
453
459
  this.getItem().addCallback(e);
454
460
  }
461
+ static setIsConsole(e) {
462
+ this.getItem().setIsConsole(e);
463
+ }
455
464
  static on(e) {
456
465
  this.getItem().on(e);
457
466
  }
@@ -5005,32 +5014,37 @@ function Sr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
5005
5014
  }
5006
5015
  //#endregion
5007
5016
  //#region src/functions/sortList.ts
5008
- var Cr = new Intl.Collator(void 0, {
5009
- numeric: !0,
5010
- sensitivity: "base"
5011
- });
5012
- function wr(e, t, n) {
5013
- return t.length === 0 || e.length < 2 ? e : [...e].sort((e, r) => {
5014
- for (let { column: i, dir: a } of t) {
5015
- if (!i) continue;
5017
+ function Cr(e, t, n) {
5018
+ var r;
5019
+ if (t.length === 0 || e.length < 2) return e;
5020
+ let i = ((r = Intl) == null ? void 0 : r.Collator) === void 0 ? void 0 : new Intl.Collator(void 0, {
5021
+ numeric: !0,
5022
+ sensitivity: "base"
5023
+ });
5024
+ return [...e].sort((e, r) => {
5025
+ for (let { column: a, dir: o } of t) {
5026
+ if (!a) continue;
5016
5027
  if (n) {
5017
- let t = n(e, r, i, a);
5028
+ let t = n(e, r, a, o);
5018
5029
  if (t !== 0) return t;
5019
5030
  continue;
5020
5031
  }
5021
- let t = H(e, i), o = H(r, i);
5022
- if (t === o) continue;
5032
+ let t = H(e, a), s = H(r, a);
5033
+ if (t === s) continue;
5023
5034
  if (c(t)) return 1;
5024
- if (c(o)) return -1;
5025
- let s = a === "desc" ? -1 : 1;
5026
- return g(t) && g(o) ? (b(t) - b(o)) * s : typeof t == "boolean" && typeof o == "boolean" ? (Number(t) - Number(o)) * s : Cr.compare(String(t), String(o)) * s;
5035
+ if (c(s)) return -1;
5036
+ let l = o === "desc" ? -1 : 1;
5037
+ if (g(t) && g(s)) return (b(t) - b(s)) * l;
5038
+ if (typeof t == "boolean" && typeof s == "boolean") return (Number(t) - Number(s)) * l;
5039
+ let u = String(t), d = String(s);
5040
+ return (i ? i.compare(u, d) : u.localeCompare(d)) * l;
5027
5041
  }
5028
5042
  return 0;
5029
5043
  });
5030
5044
  }
5031
5045
  //#endregion
5032
5046
  //#region src/functions/splice.ts
5033
- function Tr(e, n, i) {
5047
+ function wr(e, n, i) {
5034
5048
  if (t(e) && t(n)) {
5035
5049
  if (i) {
5036
5050
  let a = {}, o = !1;
@@ -5044,24 +5058,24 @@ function Tr(e, n, i) {
5044
5058
  }
5045
5059
  //#endregion
5046
5060
  //#region src/functions/toCamelCaseFirst.ts
5047
- function Er(e) {
5061
+ function Tr(e) {
5048
5062
  return it(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
5049
5063
  }
5050
5064
  //#endregion
5051
5065
  //#region src/functions/toKebabCase.ts
5052
- function Dr(e) {
5066
+ function Er(e) {
5053
5067
  return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
5054
5068
  }
5055
5069
  //#endregion
5056
5070
  //#region src/functions/toNumberByMax.ts
5057
- function Or(e, t, n, r) {
5071
+ function Dr(e, t, n, r) {
5058
5072
  let i = b(e), a = b(t);
5059
- return t && a < i ? `${kr(a, n, r)}+` : kr(i, n, r);
5073
+ return t && a < i ? `${Or(a, n, r)}+` : Or(i, n, r);
5060
5074
  }
5061
- var kr = (e, t, n) => t ? new z(n).number(e) : e;
5075
+ var Or = (e, t, n) => t ? new z(n).number(e) : e;
5062
5076
  //#endregion
5063
5077
  //#region src/functions/toNumberPositive.ts
5064
- function Ar(e, t = 0) {
5078
+ function kr(e, t = 0) {
5065
5079
  if (l(e)) {
5066
5080
  let t = Number(e);
5067
5081
  if (Number.isFinite(t) && t > 0) return t;
@@ -5070,17 +5084,17 @@ function Ar(e, t = 0) {
5070
5084
  }
5071
5085
  //#endregion
5072
5086
  //#region src/functions/toPercent.ts
5073
- function jr(e, t) {
5087
+ function Ar(e, t) {
5074
5088
  return e === 0 ? t : 1 / e * t;
5075
5089
  }
5076
5090
  //#endregion
5077
5091
  //#region src/functions/toPercentBy100.ts
5078
- function Mr(e, t) {
5079
- return jr(e, t) * 100;
5092
+ function jr(e, t) {
5093
+ return Ar(e, t) * 100;
5080
5094
  }
5081
5095
  //#endregion
5082
5096
  //#region src/functions/uint8ArrayToBase64.ts
5083
- function Nr(e) {
5097
+ function Mr(e) {
5084
5098
  let t = "";
5085
5099
  for (let n of e) t += String.fromCharCode(n);
5086
5100
  if (s()) return window.btoa(t);
@@ -5092,7 +5106,7 @@ function Nr(e) {
5092
5106
  }
5093
5107
  //#endregion
5094
5108
  //#region src/functions/writeClipboardData.ts
5095
- async function Pr(e) {
5109
+ async function Nr(e) {
5096
5110
  if (s()) try {
5097
5111
  await navigator.clipboard.writeText(e);
5098
5112
  } catch (n) {
@@ -5101,4 +5115,4 @@ async function Pr(e) {
5101
5115
  }
5102
5116
  }
5103
5117
  //#endregion
5104
- export { L as Api, P as ApiCache, ze as ApiDataReturn, Be as ApiDefault, Ue as ApiError, Ve as ApiErrorItem, He as ApiErrorStorage, We as ApiHeaders, Ke as ApiHydration, Xe as ApiInstance, F as ApiMethodItem, qe as ApiPreparation, Ye as ApiResponse, Le as ApiStatus, Ze as BroadcastMessage, et as Cache, $e as CacheItem, tt as CacheStatic, Te as Cookie, Se as CookieBlock, xe as CookieBlockInstance, k as CookieStorage, O as DataStorage, rt as Datetime, T as ErrorCenter, le as ErrorCenterHandler, ue as ErrorCenterInstance, Me as EventItem, at as Formatters, U as FormattersType, ot as GEO_FLAG_ICON_NAME, A as Geo, st as GeoFlag, Oe as GeoInstance, z as GeoIntl, ct as GeoPhone, ut as GeoUnit, dt as Global, mt as Hash, pt as HashInstance, _t as Icons, N as Loading, Pe as LoadingInstance, At as Meta, q as MetaManager, Ot as MetaOg, Tt as MetaOpenGraphAge, Ct as MetaOpenGraphAvailability, wt as MetaOpenGraphCondition, Et as MetaOpenGraphGender, Y as MetaOpenGraphTag, St as MetaOpenGraphType, xt as MetaRobots, jt as MetaStatic, J as MetaTag, kt as MetaTwitter, Dt as MetaTwitterCard, X as MetaTwitterTag, Nt as Query, Mt as QueryInstance, Pt as ResumableTimer, Ft as ScrollbarWidth, Yt as SearchList, Ht as SearchListData, Ut as SearchListItem, qt as SearchListMatcher, Jt as SearchListOptions, D as ServerStorage, Zt as StorageCallback, nn as TRANSLATE_GLOBAL_PREFIX, rn as TRANSLATE_TIME_OUT, sn as Translate, an as TranslateFile, on as TranslateInstance, Ee as UI_GEO_COOKIE_KEY, ft as UrlInstanceAbstract, Z as UrlItem, Vt as addTagHighlightMatch, S as anyToString, en as applyTemplate, cn as arrFill, pn as blobToBase64, mn as capitalize, Q as copyObject, hn as copyObjectLite, G as createElement, gn as domContentLoaded, _n as domQuerySelector, vn as domQuerySelectorAll, K as encodeAttribute, pe as encodeLiteAttribute, Sn as ensureMaxSize, It as escapeExp, Cn as eventStopPropagation, m as executeFunction, I as executePromise, r as forEach, wn as frame, Tn as getArrayHighlightMatch, En as getAttributes, Dn as getClipboardData, nt as getColumn, On as getCurrentDate, kn as getCurrentTime, j as getElement, Mn as getElementId, yn as getElementImage, vt as getElementItem, Ae as getElementOrWindow, me as getElementSafeScript, Gt as getExactSearchExp, Wt as getExp, Pn as getFirst, he as getHydrationData, H as getItemByPath, Fn as getKey, In as getLast, Ln as getLength, Rn as getLengthOfAllArray, zn as getMaxLengthAllArray, Bn as getMinLengthAllArray, Un as getMouseClient, Vn as getMouseClientX, Hn as getMouseClientY, Wn as getObjectByKeys, Gn as getObjectNoUndefined, Kn as getObjectOrNone, qn as getOnlyText, Jn as getRandomItem, Xn as getRandomText, o as getRequestString, Kt as getSearchExp, Lt as getSeparatingSearchExp, Zn as getStepPercent, Qn as getStepValue, er as goScroll, tr as goScrollSmooth, nr as goScrollTo, ir as handleShare, ar as inArray, Nn as initGetElementId, or as initScrollbarOffset, sr as intersectKey, tn as isApiSuccess, i as isArray, cr as isDifferent, ae as isDomData, s as isDomRuntime, lr as isElementVisible, dr as isEnter, l as isFilled, fr as isFloat, p as isFunction, je as isInDom, ur as isInput, pr as isIntegerBetween, mr as isMetaKey, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, x as isSelected, hr as isSelectedByList, rr as isShare, d as isString, gr as isTab, ke as isWindow, f as random, _r as removeCommonPrefix, vr as replaceComponentName, $ as replaceRecursive, br as replaceTemplate, xn as resizeImageByMax, xr as secondToTime, yt as setElementItem, Sr as setValues, ee as sleep, wr as sortList, Tr as splice, Yn as strFill, oe as strSplit, M as toArray, it as toCamelCase, Er as toCamelCaseFirst, R as toDate, Dr as toKebabCase, b as toNumber, Or as toNumberByMax, Ar as toNumberPositive, jr as toPercent, Mr as toPercentBy100, a as toString, E as transformation, Nr as uint8ArrayToBase64, yr as uniqueArray, Pr as writeClipboardData };
5118
+ export { L as Api, P as ApiCache, ze as ApiDataReturn, Be as ApiDefault, Ue as ApiError, Ve as ApiErrorItem, He as ApiErrorStorage, We as ApiHeaders, Ke as ApiHydration, Xe as ApiInstance, F as ApiMethodItem, qe as ApiPreparation, Ye as ApiResponse, Le as ApiStatus, Ze as BroadcastMessage, et as Cache, $e as CacheItem, tt as CacheStatic, Te as Cookie, Se as CookieBlock, xe as CookieBlockInstance, k as CookieStorage, O as DataStorage, rt as Datetime, T as ErrorCenter, le as ErrorCenterHandler, ue as ErrorCenterInstance, Me as EventItem, at as Formatters, U as FormattersType, ot as GEO_FLAG_ICON_NAME, A as Geo, st as GeoFlag, Oe as GeoInstance, z as GeoIntl, ct as GeoPhone, ut as GeoUnit, dt as Global, mt as Hash, pt as HashInstance, _t as Icons, N as Loading, Pe as LoadingInstance, At as Meta, q as MetaManager, Ot as MetaOg, Tt as MetaOpenGraphAge, Ct as MetaOpenGraphAvailability, wt as MetaOpenGraphCondition, Et as MetaOpenGraphGender, Y as MetaOpenGraphTag, St as MetaOpenGraphType, xt as MetaRobots, jt as MetaStatic, J as MetaTag, kt as MetaTwitter, Dt as MetaTwitterCard, X as MetaTwitterTag, Nt as Query, Mt as QueryInstance, Pt as ResumableTimer, Ft as ScrollbarWidth, Yt as SearchList, Ht as SearchListData, Ut as SearchListItem, qt as SearchListMatcher, Jt as SearchListOptions, D as ServerStorage, Zt as StorageCallback, nn as TRANSLATE_GLOBAL_PREFIX, rn as TRANSLATE_TIME_OUT, sn as Translate, an as TranslateFile, on as TranslateInstance, Ee as UI_GEO_COOKIE_KEY, ft as UrlInstanceAbstract, Z as UrlItem, Vt as addTagHighlightMatch, S as anyToString, en as applyTemplate, cn as arrFill, pn as blobToBase64, mn as capitalize, Q as copyObject, hn as copyObjectLite, G as createElement, gn as domContentLoaded, _n as domQuerySelector, vn as domQuerySelectorAll, K as encodeAttribute, pe as encodeLiteAttribute, Sn as ensureMaxSize, It as escapeExp, Cn as eventStopPropagation, m as executeFunction, I as executePromise, r as forEach, wn as frame, Tn as getArrayHighlightMatch, En as getAttributes, Dn as getClipboardData, nt as getColumn, On as getCurrentDate, kn as getCurrentTime, j as getElement, Mn as getElementId, yn as getElementImage, vt as getElementItem, Ae as getElementOrWindow, me as getElementSafeScript, Gt as getExactSearchExp, Wt as getExp, Pn as getFirst, he as getHydrationData, H as getItemByPath, Fn as getKey, In as getLast, Ln as getLength, Rn as getLengthOfAllArray, zn as getMaxLengthAllArray, Bn as getMinLengthAllArray, Un as getMouseClient, Vn as getMouseClientX, Hn as getMouseClientY, Wn as getObjectByKeys, Gn as getObjectNoUndefined, Kn as getObjectOrNone, qn as getOnlyText, Jn as getRandomItem, Xn as getRandomText, o as getRequestString, Kt as getSearchExp, Lt as getSeparatingSearchExp, Zn as getStepPercent, Qn as getStepValue, er as goScroll, tr as goScrollSmooth, nr as goScrollTo, ir as handleShare, ar as inArray, Nn as initGetElementId, or as initScrollbarOffset, sr as intersectKey, tn as isApiSuccess, i as isArray, cr as isDifferent, ae as isDomData, s as isDomRuntime, lr as isElementVisible, dr as isEnter, l as isFilled, fr as isFloat, p as isFunction, je as isInDom, ur as isInput, pr as isIntegerBetween, mr as isMetaKey, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, x as isSelected, hr as isSelectedByList, rr as isShare, d as isString, gr as isTab, ke as isWindow, f as random, _r as removeCommonPrefix, vr as replaceComponentName, $ as replaceRecursive, br as replaceTemplate, xn as resizeImageByMax, xr as secondToTime, yt as setElementItem, Sr as setValues, ee as sleep, Cr as sortList, wr as splice, Yn as strFill, oe as strSplit, M as toArray, it as toCamelCase, Tr as toCamelCaseFirst, R as toDate, Er as toKebabCase, b as toNumber, Dr as toNumberByMax, kr as toNumberPositive, Ar as toPercent, jr as toPercentBy100, a as toString, E as transformation, Mr as uint8ArrayToBase64, yr as uniqueArray, Nr as writeClipboardData };
@@ -1,2 +1,2 @@
1
- import { ErrorCenterCauseList } from '../types/errorCenter';
1
+ import { ErrorCenterCauseList } from '../types/errorCenterTypes';
2
2
  export declare const errorCauseList: ErrorCenterCauseList;
@@ -40,3 +40,11 @@ export type ErrorCenterHandlerItem = {
40
40
  * List of error handlers / Список обработчиков ошибок
41
41
  */
42
42
  export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
43
+ /**
44
+ * Callback function to check whether to log error to console / Функция обратного вызова для проверки вывода ошибки в консоль
45
+ */
46
+ export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
47
+ /**
48
+ * Type for console logging configuration / Тип для конфигурации вывода в консоль
49
+ */
50
+ export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional-basic",
3
3
  "private": false,
4
- "version": "1.8.0",
4
+ "version": "1.8.2",
5
5
  "type": "module",
6
6
  "description": "Foundational isomorphic utility library for modern web and SSR development — HTTP client, state storage, i18n localization, SEO metadata, DOM events, formatting, and data utilities. Framework-agnostic, TypeScript-first.",
7
7
  "keywords": [