1.0.2 • Published 5 years ago

kk-format v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

格式化函数工具包

安装

  • npm安装
    npm install kk-format -S
  • script标签引入

    <script src="//i.keking.cn/kk-format/index.js"></script>

使用

  • 若为 npm 安装

    在所需要的组件中引入即可

    import kkFormat from 'kk-format'
    
    let num = 10000.2222;
    kkFormat.formatMoneyThousandBit(num) // 输入结果为 "10,000.22"

方法

  • formatMoneyThousandBit

    说明: 千分位形式格式化金额,保留小数点后 2 位。 参数:String 或 Number 返回值: String

    例: kkFormat.formatMoneyThousandBit(10000.2222); // => "10,000.22"

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago