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

Function splitStep

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

Source from the content-addressed store, hash-verified

860}
861
862const splitStep = (input: string): [string, number | undefined] => {
863 const seperator = input.indexOf("/")
864 if (seperator !== -1) {
865 const step = input.slice(seperator + 1)
866 return [input.slice(0, seperator), decimalRegex.test(step) ? Number(step) : NaN]
867 }
868
869 return [input, undefined]
870}
871
872const splitRange = (input: string, aliases?: Record<string, number>): [number, number | undefined] => {
873 const seperator = input.indexOf("-")

Callers 1

parseSegmentFunction · 0.85

Calls 1

NumberInterface · 0.85

Tested by

no test coverage detected