deno.land / x / trex@v1.13.1 / handlers / handle_delete_package.ts

handle_delete_package.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** * Copyright (c) Crew Dev. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
/** * if a package has a version it returns only the name. * @param {string} pkgName - package name. * @return {string} package name. */
export function haveVersion(pkgName: string): string { const [name] = pkgName.split("@"); if (pkgName.includes("@")) return name;
return pkgName;}
trex

Version Info

Tagged at
9 months ago