MCPcopy
hub / github.com/sonofmagic/weapp-tailwindcss / round

Function round

packages-runtime/typography/src/styles.js:14–16  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

12}
13
14function round(num) {
15 return trimTrailingZeros(num.toFixed(7))
16}
17const rem = px => `${round(px / 16)}rem`
18const em = (px, base) => `${round(px / base)}em`
19const HEX_CHAR_DOUBLE_RE = /./g

Callers 4

remFunction · 0.70
emFunction · 0.70
styles.jsFile · 0.70
detect_sun_code_shapeFunction · 0.50

Calls 1

trimTrailingZerosFunction · 0.85

Tested by

no test coverage detected