@dxtmisha/functional-basic 1.2.6 → 1.2.8

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/library.js CHANGED
@@ -1205,11 +1205,11 @@ var Oe = class {
1205
1205
  findItem(e, t, n) {
1206
1206
  for (let i of this.storage) {
1207
1207
  var r;
1208
- if (!(i.method !== e || !this.isUrl(t.url, i.url)) && ((r = i.validation) != null && r.call(i, t) || n && i.code && i.code === n || i.status && i.status === t.status)) return i;
1208
+ if (!(!i.method.includes(e) || !this.isUrl(t.url, i.url)) && ((r = i.validation) != null && r.call(i, t) || n && i.code && i.code === n || i.status && i.status === t.status)) return i;
1209
1209
  }
1210
1210
  }
1211
1211
  isUrl(e, t) {
1212
- return t instanceof RegExp ? t.test(e) : e === t;
1212
+ return t instanceof RegExp ? t.test(e) : e.includes(t);
1213
1213
  }
1214
1214
  async getBody(e) {
1215
1215
  try {
@@ -5,7 +5,7 @@ export type ErrorCenterGroup = string | undefined;
5
5
  /**
6
6
  * Interface for an error item / Интерфейс для элемента ошибки
7
7
  */
8
- export type ErrorCenterCauseItem = {
8
+ export type ErrorCenterCauseItem<D = any> = {
9
9
  /** Error group / Группа ошибки */
10
10
  group?: ErrorCenterGroup;
11
11
  /** Error code / Код ошибки */
@@ -17,7 +17,7 @@ export type ErrorCenterCauseItem = {
17
17
  /** Error message / Сообщение ошибки */
18
18
  message?: string;
19
19
  /** Additional details / Дополнительные детали */
20
- details?: any;
20
+ details?: D;
21
21
  };
22
22
  /**
23
23
  * List of error items / Список элементов ошибок
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional-basic",
3
3
  "private": false,
4
- "version": "1.2.6",
4
+ "version": "1.2.8",
5
5
  "type": "module",
6
6
  "description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
7
7
  "keywords": [