@w3ux/utils 0.1.2 → 0.3.0
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.ts +2 -2
- package/index.d.ts +2 -1
- package/package.json +1 -1
- package/types.d.ts +1 -3
- package/unit.d.ts +2 -1
package/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigNumber } from 'bignumber.js';
|
|
2
|
-
import { AnyFunction } from '
|
|
2
|
+
import { AnyFunction } from '@w3ux/types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @name camelize
|
|
@@ -68,7 +68,7 @@ declare const appendOr: (condition: boolean | string | undefined, value: string,
|
|
|
68
68
|
*/
|
|
69
69
|
declare const formatAccountSs58: (address: string, ss58: number) => string;
|
|
70
70
|
/**
|
|
71
|
-
* @name
|
|
71
|
+
* @name removeHexPrefix
|
|
72
72
|
* @summary Takes a string str as input and returns a new string with the "0x" prefix removed if it
|
|
73
73
|
* exists at the beginning of the input string.
|
|
74
74
|
*/
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { appendOr, appendOrEmpty, camelize, ellipsisFn, formatAccountSs58, greaterThanZero, isNotZero, minDecimalPlaces, pageFromUri, removeHexPrefix, rmCommas, shuffle, withTimeout } from './base.js';
|
|
2
2
|
export { addedTo, applyWidthAsPadding, capitalizeFirstLetter, determinePoolDisplay, evalUnits, extractUrlValue, inChrome, isValidAddress, isValidHttpUrl, localStorageOrDefault, makeCancelable, matchedProperties, mergeDeep, planckToUnit, remToUnit, removeVarFromUrlHash, removedFrom, setStateWithRef, snakeToCamel, sortWithNull, stringToBigNumber, transformToBaseUnit, unescape, unimplemented, unitToPlanck, varToUrlHash } from './unit.js';
|
|
3
3
|
import 'bignumber.js';
|
|
4
|
-
import '
|
|
4
|
+
import '@w3ux/types';
|
|
5
5
|
import 'react';
|
|
6
|
+
import './types.js';
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
type AnyJson = any;
|
|
2
1
|
type AnyObject = any;
|
|
3
|
-
type AnyFunction = any;
|
|
4
2
|
declare enum EvalMessages {
|
|
5
3
|
GIBBERISH = "Input is not correct. Use numbers, floats or expression (e.g. 1k, 1.3m)",
|
|
6
4
|
ZERO = "You cannot send 0 funds",
|
|
@@ -9,4 +7,4 @@ declare enum EvalMessages {
|
|
|
9
7
|
GENERAL_ERROR = "Check your input. Something went wrong"
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
export { type
|
|
10
|
+
export { type AnyObject, EvalMessages };
|
package/unit.d.ts
CHANGED