@xchainjs/xchain-util
Version:
Helper utilities for XChain clients
10 lines (9 loc) • 432 B
TypeScript
/**
* Removes leading / trailing zeros from a string of numbers
* (1) Regex to remove trailing zeros https://stackoverflow.com/a/53397618/2032698
* (2) Regex to remove leading zeros https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch06s06.html
*
* @param {string} value
* @returns {string} The result after removing trailing zeros.
*/
export declare const trimZeros: (value: string) => string;