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

Function splitStep

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

Source from the content-addressed store, hash-verified

1473}
1474
1475const splitStep = (input: string): [string, number | undefined] => {
1476 const separator = input.indexOf("/")
1477 if (separator !== -1) {
1478 const step = input.slice(separator + 1)
1479 return [input.slice(0, separator), decimalRegex.test(step) ? Number(step) : NaN]
1480 }
1481
1482 return [input, undefined]
1483}
1484
1485const splitRange = (input: string, aliases?: Record<string, number>): [number, number | undefined] => {
1486 const separator = input.indexOf("-")

Callers 1

parseSegmentFunction · 0.85

Calls 2

sliceMethod · 0.80
NumberFunction · 0.70

Tested by

no test coverage detected