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

Function _a

resources/vega-lite.min.js:2699–2727  ·  view source on GitHub ↗
(e, n)

Source from the content-addressed store, hash-verified

2697 var n;
2698 }
2699 function _a(e, n) {
2700 let {
2701 timeUnit: i,
2702 type: r,
2703 wrapTime: o,
2704 undefinedIfExprNotRequired: a,
2705 } = n;
2706 const s = i && Ii(i)?.unit;
2707 let l,
2708 c = s || "temporal" === r;
2709 return (
2710 vn(e)
2711 ? (l = e.expr)
2712 : wn(e)
2713 ? (l = e.signal)
2714 : Di(e)
2715 ? ((c = !0), (l = Pi(e)))
2716 : (t.isString(e) || t.isNumber(e)) &&
2717 c &&
2718 ((l = `datetime(${Q(e)})`),
2719 (function (e) {
2720 return t.hasOwnProperty(Ni, e);
2721 })(s) &&
2722 ((t.isNumber(e) && e < 1e4) ||
2723 (t.isString(e) && isNaN(Date.parse(e)))) &&
2724 (l = Pi({ [s]: e }))),
2725 l ? (o && c ? `time(${l})` : l) : a ? void 0 : Q(e)
2726 );
2727 }
2728 function Pa(e, t) {
2729 const { type: n } = e;
2730 return t.map((t) => {

Callers 4

trFunction · 0.70
PaFunction · 0.70
umFunction · 0.70
NmFunction · 0.70

Calls 7

vnFunction · 0.85
IiFunction · 0.70
wnFunction · 0.70
DiFunction · 0.70
PiFunction · 0.70
QFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected