toDurationCoerce a duration expression to milliseconds, or null when it reads as no durationutils-toduration5logUtilsindex.jsCoercionUnit words and abbreviations both read, so 10 minutes, 2hrs, and 300msecs all work. Years and months have no fixed length, so name your own value with toDuration.config.units["utils","coercion","toduration","duration","time","parse"]Example
Categories