Coerces a string if possible
coerce('1.2.3.4') // '1.2.3'coerce('1.2.3.4', { rtl: true }) // '2.3.4' Copy
coerce('1.2.3.4') // '1.2.3'coerce('1.2.3.4', { rtl: true }) // '2.3.4'
build identifier ([+BUILD]) is taken into account
[+BUILD]
string to coerce
Optional
options object
version string (including build identifier if it exists) or null if the version string is invalid
Coerces a string if possible
Example
Remarks
build identifier (
[+BUILD]
) is taken into account