MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / normalizeObjectFit

Function normalizeObjectFit

packages/engine/src/utils/alphaBlit.ts:874–887  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

872 * values) collapses to `"fill"` — the CSS default for replaced elements.
873 */
874export function normalizeObjectFit(value: string | undefined): ObjectFit {
875 switch ((value ?? "").trim().toLowerCase()) {
876 case "cover":
877 return "cover";
878 case "contain":
879 return "contain";
880 case "none":
881 return "none";
882 case "scale-down":
883 return "scale-down";
884 default:
885 return "fill";
886 }
887}
888
889/**
890 * Parse a CSS `matrix(a,b,c,d,e,f)` or `matrix3d(...)` string into a 6-element

Callers 2

decodeHdrImageBuffersFunction · 0.90
alphaBlit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected