MCPcopy
hub / github.com/vercel/next.js / ug

Function ug

packages/next/src/compiled/@vercel/og/index.edge.js:16408–16414  ·  view source on GitHub ↗
({ color: e, property: t, variable: n })

Source from the content-addressed store, hash-verified

16406 return r === null ? n : (0, vi.formatColor)({ ...r, alpha: t });
16407 }
16408 function ug({ color: e, property: t, variable: n }) {
16409 let r = [].concat(t);
16410 if (typeof e == "function")
16411 return { [n]: "1", ...Object.fromEntries(r.map((o) => [o, e({ opacityVariable: n, opacityValue: `var(${n})` })])) };
16412 let i = (0, vi.parseColor)(e);
16413 return i === null ? Object.fromEntries(r.map((o) => [o, e])) : i.alpha !== void 0 ? Object.fromEntries(r.map((o) => [o, e])) : { [n]: "1", ...Object.fromEntries(r.map((o) => [o, (0, vi.formatColor)({ ...i, alpha: `var(${n})` })])) };
16414 }
16415});
16416var Hl = U((ys) => {
16417 "use strict";

Callers

nothing calls this directly

Calls 3

eFunction · 0.70
concatMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected