Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c77bba3

Browse files
author
strausr
committed
fix comments
1 parent a104a61 commit c77bba3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sdkAnalytics/encodeOSVersion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {base64Map} from "./base64Map.js";
33
/**
44
* @private
55
* @description Encodes a semVer-like version string for OS
6-
* @param {string} semVer Input can be either x.y.z or x.y
7-
* @return {string} A string built from 3 characters of the base64 table that encode the semVer
6+
* @param {string} semVer Input is x.y
7+
* @return {string} A string built from 2 characters of the base64 table that encode the semVer
88
*/
99
export function encodeOSVersion(semVer: string):string {
1010
const [major, minor] = semVer.split('.');

src/sdkAnalytics/encodeVersion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function encodeVersion(semVer: string):string {
1717
const paddedStringLength = parts * 6; // we pad to either 12 or 18 characters
1818
// reverse (but don't mirror) the version. 1.5.15 -> 15.5.1
1919
const reversedSemver = reverseVersion(semVer);
20-
// Pad to two spaces, 15.5.1 -> 15.05.01x
20+
// Pad to two spaces, 15.5.1 -> 15.05.01
2121
const paddedSemver = padVersion(reversedSemver);
2222
// turn 15.05.01 to a string '150501' then to a number 150501
2323
const num = parseInt(paddedSemver.split('.').join(''));

0 commit comments

Comments
 (0)