MCPcopy Create free account
hub / github.com/alignoth/alignoth / Ao

Function Ao

resources/vega.min.js:2880–2946  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

2878 return (n) => e[n] || (e[n] = t(n));
2879 }
2880 function Ao(t) {
2881 const e = ko(t.format),
2882 n = t.formatPrefix;
2883 return {
2884 format: e,
2885 formatPrefix: n,
2886 formatFloat(t) {
2887 const n = Oe(t || ",");
2888 if (null == n.precision) {
2889 switch (((n.precision = 12), n.type)) {
2890 case "%":
2891 n.precision -= 2;
2892 break;
2893 case "e":
2894 n.precision -= 1;
2895 }
2896 return (
2897 (r = e(n)),
2898 (i = e(".1f")(1)[1]),
2899 (t) => {
2900 const e = r(t),
2901 n = e.indexOf(i);
2902 if (n < 0) return e;
2903 let o = (function (t, e) {
2904 let n,
2905 r = t.lastIndexOf("e");
2906 if (r > 0) return r;
2907 for (r = t.length; --r > e; )
2908 if (((n = t.charCodeAt(r)), n >= 48 && n <= 57)) return r + 1;
2909 })(e, n);
2910 const a = o < e.length ? e.slice(o) : "";
2911 for (; --o > n; )
2912 if ("0" !== e[o]) {
2913 ++o;
2914 break;
2915 }
2916 return e.slice(0, o) + a;
2917 }
2918 );
2919 }
2920 return e(n);
2921 var r, i;
2922 },
2923 formatSpan(t, r, i, o) {
2924 o = Oe(null == o ? ",f" : o);
2925 const a = xe(t, r, i),
2926 s = Math.max(Math.abs(t), Math.abs(r));
2927 let u;
2928 if (null == o.precision)
2929 switch (o.type) {
2930 case "s":
2931 return (isNaN((u = Ve(a, s))) || (o.precision = u), n(o, s));
2932 case "":
2933 case "e":
2934 case "g":
2935 case "p":
2936 case "r":
2937 isNaN((u = Xe(a, s))) || (o.precision = u - ("e" === o.type));

Callers 2

DoFunction · 0.70
CoFunction · 0.70

Calls 1

koFunction · 0.70

Tested by

no test coverage detected