Encodes a semantic version string or number into a single number using bitwise operations. The encoding packs the major version in the high byte and the minor version in the low byte:
encoded = (major << 8) | minor
Examples: '1.3' => 0x0103 (259) '77.0' => 0x4d00 (19712)
Bitwise encoded version as a number. Returns 0 if parsing fails.
Semantic version as a string (e.g., "1.3") or a numeric code.
Generated using TypeDoc
Encodes a semantic version string or number into a single number using bitwise operations. The encoding packs the major version in the high byte and the minor version in the low byte:
encoded = (major << 8) | minor
Examples: '1.3' => 0x0103 (259) '77.0' => 0x4d00 (19712)
Returns
Bitwise encoded version as a number. Returns 0 if parsing fails.