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