05 2023 档案

摘要:export function toFixedReg(value, count) { // 小括号内是我们想要的结果 const reg = new RegExp(`(\\d+\\.?\\d{0,${count}})[\\.\\d]*`); return (value + '.' + '0'.rep 阅读全文
posted @ 2023-05-24 11:32 起风了1573 阅读(9) 评论(0) 推荐(0) 编辑
摘要:export function fmtWalletAddress(str) { if (str == '' || str == undefined || str == "undefined") return str return str.replace(/^(.{6})(?:\w+)(.{4})$/ 阅读全文
posted @ 2023-05-24 11:31 起风了1573 阅读(9) 评论(0) 推荐(0) 编辑
摘要:let b = utils.formatUnits(item[0].toString(), 9); let str1 = ""; let str2 = ""; // 处理有小数点的情况 if (String(b).indexOf(".") > -1) { console.log("是小数"); // 阅读全文
posted @ 2023-05-12 16:14 起风了1573 阅读(48) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示