@talismn/util 0.0.0-pr2029-20250610024205 → 0.0.0-pr2043-20250619170346

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.
@@ -28,3 +28,4 @@ export * from "./isAddressEqual";
28
28
  export * from "./isAscii";
29
29
  export * from "./isNotNil";
30
30
  export * from "./isTruthy";
31
+ export * from "./isAbortError";
@@ -0,0 +1 @@
1
+ export declare const isAbortError: (error: unknown) => boolean;
@@ -316,6 +316,10 @@ const isNotNil = value => value !== null && value !== undefined;
316
316
 
317
317
  const isTruthy = value => Boolean(value);
318
318
 
319
+ const isAbortError = error => {
320
+ return error instanceof Error && error.name === "AbortError";
321
+ };
322
+
319
323
  exports.BigMath = BigMath;
320
324
  exports.Deferred = Deferred;
321
325
  exports.MAX_DECIMALS_FORMAT = MAX_DECIMALS_FORMAT;
@@ -330,6 +334,7 @@ exports.firstThenDebounce = firstThenDebounce;
330
334
  exports.formatDecimals = formatDecimals;
331
335
  exports.formatPrice = formatPrice;
332
336
  exports.hasOwnProperty = hasOwnProperty;
337
+ exports.isAbortError = isAbortError;
333
338
  exports.isAddressEqual = isAddressEqual;
334
339
  exports.isArrayOf = isArrayOf;
335
340
  exports.isAscii = isAscii;
@@ -316,6 +316,10 @@ const isNotNil = value => value !== null && value !== undefined;
316
316
 
317
317
  const isTruthy = value => Boolean(value);
318
318
 
319
+ const isAbortError = error => {
320
+ return error instanceof Error && error.name === "AbortError";
321
+ };
322
+
319
323
  exports.BigMath = BigMath;
320
324
  exports.Deferred = Deferred;
321
325
  exports.MAX_DECIMALS_FORMAT = MAX_DECIMALS_FORMAT;
@@ -330,6 +334,7 @@ exports.firstThenDebounce = firstThenDebounce;
330
334
  exports.formatDecimals = formatDecimals;
331
335
  exports.formatPrice = formatPrice;
332
336
  exports.hasOwnProperty = hasOwnProperty;
337
+ exports.isAbortError = isAbortError;
333
338
  exports.isAddressEqual = isAddressEqual;
334
339
  exports.isArrayOf = isArrayOf;
335
340
  exports.isAscii = isAscii;
@@ -310,4 +310,8 @@ const isNotNil = value => value !== null && value !== undefined;
310
310
 
311
311
  const isTruthy = value => Boolean(value);
312
312
 
313
- export { BigMath, Deferred, MAX_DECIMALS_FORMAT, addTrailingSlash, blake2Concat, classNames, convertAddress, decodeAnyAddress, decodeSs58Format, encodeAnyAddress, firstThenDebounce, formatDecimals, formatPrice, hasOwnProperty, isAddressEqual, isArrayOf, isAscii, isBigInt, isBooleanTrue, isEthereumAddress, isNotNil, isTruthy, isValidSubstrateAddress, normalizeAddress, planckToTokens, sleep, throwAfter, tokensToPlanck, twox64Concat, validateHexString };
313
+ const isAbortError = error => {
314
+ return error instanceof Error && error.name === "AbortError";
315
+ };
316
+
317
+ export { BigMath, Deferred, MAX_DECIMALS_FORMAT, addTrailingSlash, blake2Concat, classNames, convertAddress, decodeAnyAddress, decodeSs58Format, encodeAnyAddress, firstThenDebounce, formatDecimals, formatPrice, hasOwnProperty, isAbortError, isAddressEqual, isArrayOf, isAscii, isBigInt, isBooleanTrue, isEthereumAddress, isNotNil, isTruthy, isValidSubstrateAddress, normalizeAddress, planckToTokens, sleep, throwAfter, tokensToPlanck, twox64Concat, validateHexString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/util",
3
- "version": "0.0.0-pr2029-20250610024205",
3
+ "version": "0.0.0-pr2043-20250619170346",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",