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

Method assembleTransforms

resources/vega-lite.min.js:9775–9797  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9773 return new Set(D(this._parse));
9774 }
9775 assembleTransforms() {
9776 let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
9777 return D(this._parse)
9778 .filter((t) => !e || q(t) > 1)
9779 .map((e) => {
9780 const t = (function (e, t) {
9781 const n = A(e);
9782 if ("number" === t) return `toNumber(${n})`;
9783 if ("boolean" === t) return `toBoolean(${n})`;
9784 if ("string" === t) return `toString(${n})`;
9785 if ("date" === t) return `toDate(${n})`;
9786 if ("flatten" === t) return n;
9787 if (t.startsWith("date:"))
9788 return `timeParse(${n},'${Fd(t.slice(5, t.length))}')`;
9789 if (t.startsWith("utc:"))
9790 return `utcParse(${n},'${Fd(t.slice(4, t.length))}')`;
9791 return (Si(`Unrecognized parse "${t}".`), null);
9792 })(e, this._parse[e]);
9793 if (!t) return null;
9794 return { type: "formula", expr: t, as: L(e) };
9795 })
9796 .filter((e) => null !== e);
9797 }
9798 }
9799 class _d extends $c {
9800 clone() {

Callers 1

opFunction · 0.80

Calls 7

DFunction · 0.85
FdFunction · 0.85
qFunction · 0.70
AFunction · 0.70
SiFunction · 0.70
LFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected