version string
OptionaloptionsOrLoose: boolean | Optionsan options object { loose } (where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings
cleaned version string or null if version is invalid
Returns cleaned (removed leading/trailing whitespace, remove '=', 'v' prefixes) and parsed version, or
nullif version is invalid.Example