MCPcopy Create free account
hub / github.com/cuth/postcss-pxtorem / toFixed

Function toFixed

index.js:56–60  ·  view source on GitHub ↗
(number, precision)

Source from the content-addressed store, hash-verified

54}
55
56function toFixed(number, precision) {
57 const multiplier = Math.pow(10, precision + 1),
58 wholeNumber = Math.floor(number * multiplier);
59 return (Math.round(wholeNumber / 10) * 10) / multiplier;
60}
61
62function declarationExists(decls, prop, value) {
63 return decls.some(decl => decl.prop === prop && decl.value === value);

Callers 1

createPxReplaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…