xmcommon
Advanced tools
Comparing version 0.0.19 to 0.0.20
{ | ||
"name": "xmcommon", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "javascript common lib for es6", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,3 +34,3 @@ # xmcommon | ||
## 0.0.19 | ||
## 0.0.20 | ||
@@ -42,2 +42,3 @@ - 2019-06-26 | ||
- \* 优化人民币大写生成, 主要有小于1元的情况,分为0的时候,要加整 | ||
- \* 增加生成大写,index.d.ts定义 | ||
@@ -44,0 +45,0 @@ ## 0.0.17 |
@@ -1005,2 +1005,11 @@ // Type definitions for xmcommon 0.0 | ||
/** 生成中文大写选项 */ | ||
interface IChineseOption { | ||
/** 人民币前缀 */ | ||
prefix? : string; | ||
/** 负数前缀 */ | ||
negative?: string; | ||
/** 后缀:整 */ | ||
zheng? : string; | ||
} | ||
/** | ||
@@ -1041,2 +1050,4 @@ * 货币类 | ||
*/ | ||
class CNYCurrency { | ||
@@ -1130,6 +1141,9 @@ /** */ | ||
* - 增加在元后,角为0的情况增加0,如0.01为零元零角 | ||
* @param {string} paramNegative 如果是负数时,前面的前缀 | ||
* @return {string} 中文大写结果 | ||
* - 选项prefix:表示自定义人民币前缀,没有默认为“人民币” | ||
* - 选项negative:表示自定义负数前缀,没有默认为“负” | ||
* - 选项zheng:表示自定义整后缀,没有默认为“整”,有些情况可能需要“正”, 使用的时候请注意选项 | ||
* @param paramOpts 如果是负数时,前面的前缀 | ||
* @return 中文大写结果 | ||
*/ | ||
public Chinese(): string; | ||
public Chinese(paramOpts?:IChineseOption): string; | ||
/** | ||
@@ -1136,0 +1150,0 @@ * 格式化输出 |
130679
3838
186