Parses a duration into milliseconds: integer milliseconds ("1500") or Go-style units ("500ms", "10s", "2m", "1h", "1m30s"). Returns undefined when invalid.
"1500"
"500ms"
"10s"
"2m"
"1h"
"1m30s"
undefined
Parses a duration into milliseconds: integer milliseconds (
"1500") or Go-style units ("500ms","10s","2m","1h","1m30s"). Returnsundefinedwhen invalid.