MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / roundIntervalValue

Function roundIntervalValue

console/src/utils/format.ts:128–137  ·  view source on GitHub ↗
(
  valueToRound: number,
  smallerUnitValue: number | undefined,
  threshold: number,
)

Source from the content-addressed store, hash-verified

126}
127
128function roundIntervalValue(
129 valueToRound: number,
130 smallerUnitValue: number | undefined,
131 threshold: number,
132) {
133 if (smallerUnitValue && smallerUnitValue >= threshold) {
134 return ++valueToRound;
135 }
136 return valueToRound;
137}
138
139export function formatIntervalShort(interval: IPostgresInterval) {
140 if (interval.years) {

Callers 1

formatIntervalShortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected