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

Function hm

resources/vega-lite.min.js:10819–10896  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

10817 );
10818 }
10819 function hm(e) {
10820 const n = b(
10821 e.map((e) => {
10822 if (Sn(e)) {
10823 const { sort: t, ...n } = e;
10824 return n;
10825 }
10826 return e;
10827 }),
10828 d,
10829 ),
10830 i = b(
10831 e
10832 .map((e) => {
10833 if (Sn(e)) {
10834 const t = e.sort;
10835 return (
10836 void 0 === t ||
10837 z(t) ||
10838 ("op" in t && "count" === t.op && delete t.field,
10839 "ascending" === t.order && delete t.order),
10840 t
10841 );
10842 }
10843 })
10844 .filter((e) => void 0 !== e),
10845 d,
10846 );
10847 if (0 === n.length) return;
10848 if (1 === n.length) {
10849 const n = e[0];
10850 if (Sn(n) && i.length > 0) {
10851 let e = i[0];
10852 if (i.length > 1) {
10853 Si(yi);
10854 const n = i.filter(
10855 (e) => t.isObject(e) && "op" in e && "min" !== e.op,
10856 );
10857 e =
10858 !i.every((e) => t.isObject(e) && "op" in e) ||
10859 1 !== n.length ||
10860 n[0];
10861 } else if (t.isObject(e) && "field" in e) {
10862 const t = e.field;
10863 n.field === t && (e = !e.order || { order: e.order });
10864 }
10865 return { ...n, sort: e };
10866 }
10867 return n;
10868 }
10869 const r = b(
10870 i.map((e) =>
10871 z(e) || !("op" in e) || (t.isString(e.op) && t.hasOwnProperty(rn, e.op))
10872 ? e
10873 : (Si(
10874 (function (e) {
10875 return `Dropping sort property ${Q(e)} as unioned domains only support boolean or op "count", "min", and "max".`;
10876 })(e),

Callers 1

vmFunction · 0.70

Calls 6

SnFunction · 0.85
bFunction · 0.70
zFunction · 0.70
SiFunction · 0.70
QFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected