xiguaxigua / numerify

number format tool.

Home Page:http://xiguaxigua.com/numerify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

常量声明错误,导致在数值过大时输出错误的格式化结果

doommm opened this issue · comments

commented

打包后的代码文件index.es.js,第一个声明的常量ABBR

// numerify
var ABBR = {
  th: 3,
  mi: 6,
  bi: 9,
  tr: 12
};

// numeral
var abbreviations = {
  thousand: 'k',
  million: 'm',
  billion: 'b',
  trillion: 't',
};

numeral很类似中这一块用来声明locale相关的文本,不明白为什么这里变成了长度,并且调用的3处引用的属性名全部错误

已知的bug是数值长度超15位时返回错误结果。不知道您这边方便更新吗?因为v-charts也用了这个库,如果不更新的话还是蛮头疼的 @xiguaxigua