@w3ux/utils 2.0.2 → 2.0.4
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/base.d.cts +3 -5
- package/base.d.ts +3 -5
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/package.json +1 -1
package/base.d.cts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AnyFunction } from '@w3ux/types';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Ensures a number has at least the specified number of decimal places, retaining commas in the output if they are present in the input.
|
|
5
3
|
*
|
|
@@ -57,9 +55,9 @@ declare const shuffle: <T>(array: T[]) => T[];
|
|
|
57
55
|
* @name withTimeout
|
|
58
56
|
* @summary Timeout a promise after a specified number of milliseconds.
|
|
59
57
|
*/
|
|
60
|
-
declare const withTimeout: (ms: number, promise:
|
|
61
|
-
onTimeout?:
|
|
62
|
-
}) => Promise<
|
|
58
|
+
declare const withTimeout: (ms: number, promise: Promise<() => void>, options?: {
|
|
59
|
+
onTimeout?: () => void;
|
|
60
|
+
}) => Promise<unknown>;
|
|
63
61
|
/**
|
|
64
62
|
* @name appendOrEmpty
|
|
65
63
|
* @summary Returns ` value` if a condition is truthy, or an empty string otherwise.
|
package/base.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AnyFunction } from '@w3ux/types';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Ensures a number has at least the specified number of decimal places, retaining commas in the output if they are present in the input.
|
|
5
3
|
*
|
|
@@ -57,9 +55,9 @@ declare const shuffle: <T>(array: T[]) => T[];
|
|
|
57
55
|
* @name withTimeout
|
|
58
56
|
* @summary Timeout a promise after a specified number of milliseconds.
|
|
59
57
|
*/
|
|
60
|
-
declare const withTimeout: (ms: number, promise:
|
|
61
|
-
onTimeout?:
|
|
62
|
-
}) => Promise<
|
|
58
|
+
declare const withTimeout: (ms: number, promise: Promise<() => void>, options?: {
|
|
59
|
+
onTimeout?: () => void;
|
|
60
|
+
}) => Promise<unknown>;
|
|
63
61
|
/**
|
|
64
62
|
* @name appendOrEmpty
|
|
65
63
|
* @summary Returns ` value` if a condition is truthy, or an empty string otherwise.
|
package/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { appendOr, appendOrEmpty, camelize, ellipsisFn, eqSet, formatAccountSs58, isSuperset, maxBigInt, minBigInt, minDecimalPlaces, pageFromUri, removeHexPrefix, rmCommas, rmDecimals, shuffle, withTimeout } from './base.cjs';
|
|
2
2
|
export { u8aConcat } from './convert.cjs';
|
|
3
3
|
export { addedTo, applyWidthAsPadding, capitalizeFirstLetter, extractUrlValue, inChrome, isValidAddress, isValidHttpUrl, localStorageOrDefault, makeCancelable, matchedProperties, mergeDeep, planckToUnit, remToUnit, removeVarFromUrlHash, removedFrom, setStateWithRef, snakeToCamel, sortWithNull, unescape, unimplemented, unitToPlanck, varToUrlHash } from './unit.cjs';
|
|
4
|
-
import '@w3ux/types';
|
|
5
4
|
import 'react';
|
|
6
5
|
import './types.cjs';
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { appendOr, appendOrEmpty, camelize, ellipsisFn, eqSet, formatAccountSs58, isSuperset, maxBigInt, minBigInt, minDecimalPlaces, pageFromUri, removeHexPrefix, rmCommas, rmDecimals, shuffle, withTimeout } from './base.js';
|
|
2
2
|
export { u8aConcat } from './convert.js';
|
|
3
3
|
export { addedTo, applyWidthAsPadding, capitalizeFirstLetter, extractUrlValue, inChrome, isValidAddress, isValidHttpUrl, localStorageOrDefault, makeCancelable, matchedProperties, mergeDeep, planckToUnit, remToUnit, removeVarFromUrlHash, removedFrom, setStateWithRef, snakeToCamel, sortWithNull, unescape, unimplemented, unitToPlanck, varToUrlHash } from './unit.js';
|
|
4
|
-
import '@w3ux/types';
|
|
5
4
|
import 'react';
|
|
6
5
|
import './types.js';
|