libnexa-ts
Version:
A pure and powerful Nexa SDK library.
32 lines • 1.01 kB
TypeScript
export default class CommonUtils {
/**
* Determines whether a string contains only hexadecimal values
*
* @param value
* @returns true if the string is the hexa representation of a number
*/
static isHexa(value: unknown): boolean;
/**
* Test if an argument is a valid JSON object. If it is, returns a truthy
* value (the json object decoded), so no double JSON.parse call is necessary
*
* @param arg
* @return false if the argument is not a JSON string.
*/
static isValidJSON(arg: string): object | boolean;
/**
* Checks that a value is a natural number.
*
* @param value
* @return true if a positive integer or zero.
*/
static isNaturalNumber(value: number): boolean;
/**
* Checks that a value is a natural number.
*
* @param value
* @return true if a positive integer or zero.
*/
static isNaturalBigInt(value: bigint): boolean;
}
//# sourceMappingURL=common.utils.d.ts.map