@limetech/lime-elements
Version:
2 lines • 829 B
JavaScript
import{c as t,a as n}from"./p-4e9b4087.js";var r=t((function(t){(function(n){function r(){var t;if(!(this instanceof r)){var n=arguments[0];var a=arguments[1];t=arguments[2];var i=new r(t);return i.abbreviate(n,a)}t=arguments[0];this.units=t==null?["k","m","b","t"]:t}r.prototype._abbreviate=function(t,n){n=Math.pow(10,n);for(var r=this.units.length-1;r>=0;r--){var a=Math.pow(10,(r+1)*3);if(a<=t){t=Math.round(t*n/a)/n;if(t===1e3&&r<this.units.length-1){t=1;r++}t+=this.units[r];break}}return t};r.prototype.abbreviate=function(t,n){var r=t<0;var a=this._abbreviate(Math.abs(t),n||0);return r?"-"+a:a};if(t.exports){t.exports=r}else{n.NumberAbbreviate=r}})(n)}));function a(t){if(typeof t!=="number"){return""}const n=["k","M","B","T"];const a=new r(n);return a.abbreviate(t,1)}export{a};
//# sourceMappingURL=p-b6a372c9.js.map