Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/util/common/vscodeVersion.ts
13397 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/**
7
* Sanitizes the version of VS Code to remove the minor version bump and -insider suffix
8
* @param vsCodeVersion The version of VS Code to sanitize i.e. 1.77.0-insider
9
* @returns The sanitized version of VS Code i.e. 1.77
10
*/
11
export function sanitizeVSCodeVersion(vsCodeVersion: string): string {
12
const splitVersion = vsCodeVersion.split('.');
13
return `${splitVersion[0]}.${splitVersion[1]}`;
14
}
15