microfoom
API referenceFunctions

durationToMs

Function: durationToMs()

function durationToMs(duration): number | undefined;

Defined in: packages/microfoom-core/src/config.ts:107

Parse a Duration literal to milliseconds. Returns undefined for a malformed string so callers can reject it through the typed error channel rather than trusting a silent NaN.

Parameters

ParameterType
durationDuration

Returns

number | undefined

On this page