File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11import type { Config , ImageParameters } from "../types/config" ;
22import { hasComposer , hasNpm , hasYarn } from "./packageManagers" ;
3-
4- const encodeUri = ( value : string | undefined ) : string => {
5- if ( value === "" || value === undefined ) {
6- return "" ;
7- }
8-
9- return encodeURIComponent ( value ) ;
10- } ;
3+ import { encodeUri } from './strings'
114
125const detectPackageManager = ( config : Config , visibility : string ) : string => {
136 if ( hasComposer ( config ) ) {
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ export const titleCase = (title: string | undefined) => {
99 . replace ( / ( ^ | \s | - | _ ) \S / g, ( match : string ) => match . toUpperCase ( ) )
1010 . replace ( / [ - _ ] / g, " " ) ;
1111} ;
12+
13+ export const encodeUri = ( value : string | undefined ) : string => {
14+ if ( value === "" || value === undefined ) {
15+ return "" ;
16+ }
17+
18+ return encodeURIComponent ( value ) ;
19+ } ;
You can’t perform that action at this time.
0 commit comments