MCPcopy Create free account
hub / github.com/Effect-TS/effect / splitStep

Function splitStep

packages/effect/src/Cron.ts:1295–1303  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1293}
1294
1295const splitStep = (input: string): [string, number | undefined] => {
1296 const separator = input.indexOf("/")
1297 if (separator !== -1) {
1298 const step = input.slice(separator + 1)
1299 return [input.slice(0, separator), decimalRegex.test(step) ? Number(step) : NaN]
1300 }
1301
1302 return [input, undefined]
1303}
1304
1305const splitRange = (input: string, aliases?: Record<string, number>): [number, number | undefined] => {
1306 const separator = input.indexOf("-")

Callers 1

parseSegmentFunction · 0.85

Calls 1

NumberInterface · 0.70

Tested by

no test coverage detected