MCPcopy Create free account
hub / github.com/bendrucker/postgres-interval / readNextNum

Function readNextNum

index.js:161–176  ·  view source on GitHub ↗
(interval)

Source from the content-addressed store, hash-verified

159const position = { value: 0 }
160
161function readNextNum (interval) {
162 let val = 0
163
164 while (position.value < interval.length) {
165 const char = interval[position.value]
166
167 if (char >= '0' && char <= '9') {
168 val = val * 10 + +char
169 position.value++
170 } else {
171 break
172 }
173 }
174
175 return val
176}
177
178function parseMillisecond (interval) {
179 const previousPosition = position.value

Callers 2

parseMillisecondFunction · 0.85
parseFunction · 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…