1.0.2 • Published 6 months ago
naive-tofixed v1.0.2
naive-tofixed
To fix the error of the toFixed method not preserving decimal places
修正toFixed方法保留小数位的错误
install
npm install naive-tofixed
import and use
import NaToFixed from 'naive-tofixed'
const a = 1.345
console.log(a.toFixed(2)) // '1.34'
console.log(NaToFixed(a, 2)) // '1.35' got it!