MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / toInt

Function toInt

packages/extension/utils/css.ts:1183–1186  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

1181 const parts = rgb[1].split(',').map((p) => p.trim())
1182 const [r, g, b, a = '1'] = parts
1183 const toInt = (v: string) => {
1184 const n = Number(v)
1185 return Number.isFinite(n) ? Math.round(n) : null
1186 }
1187 const ri = toInt(r)
1188 const gi = toInt(g)
1189 const bi = toInt(b)

Callers 1

canonicalizeColorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected