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

Function ga

packages/next/src/compiled/@vercel/og/index.edge.js:17123–17134  ·  view source on GitHub ↗
(e, t)

Source from the content-addressed store, hash-verified

17121 console.warn(`Invalid value "${e}"${typeof t == "string" ? ` for "${t}"` : ""}. Expected a number, "auto", or a percentage value (e.g., "50%").`);
17122}
17123function ga(e, t) {
17124 if (t === "break-all")
17125 return { words: Ve(e, "grapheme"), requiredBreaks: [] };
17126 if (t === "keep-all")
17127 return { words: Ve(e, "word"), requiredBreaks: [] };
17128 let n = new $557adaaeb0c7885f$exports(e), r = 0, i = n.nextBreak(), o = [], s = [false];
17129 for (; i; ) {
17130 let a = e.slice(r, i.position);
17131 o.push(a), i.required ? s.push(true) : s.push(false), r = i.position, i = n.nextBreak();
17132 }
17133 return { words: o, requiredBreaks: s };
17134}
17135var ba = (e) => e.replaceAll(/([A-Z])/g, (t, n) => `-${n.toLowerCase()}`);
17136function $n(e, t = ",") {
17137 let n = [], r = 0, i = 0;

Callers 1

bdFunction · 0.70

Calls 4

VeFunction · 0.70
pushMethod · 0.65
nextBreakMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected