he wei
2025-06-03 a10f3b82e33756ed0cd62a0cbe83bab8674df16f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import digits from './const/const_digit';
 
function isNumeric(str) {
  return !isNaN(Number(str));
}
 
function toFixed(value, bit) {
  if (!isNumeric(value) || !isNumeric(bit)) return value;
  const num = Math.pow(10, bit);
  return Math.round(value * num) / num;
}
 
export {
  digits,
  toFixed
};