File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 " dist/"
1919 ],
2020 "scripts" : {
21+ "bench" : " vitest bench" ,
2122 "build" : " ts-scripts build" ,
2223 "format" : " ts-scripts format" ,
2324 "lint" : " ts-scripts lint" ,
Original file line number Diff line number Diff line change @@ -38,11 +38,10 @@ export function parse(string: string): Credentials | undefined {
3838 const colonIndex = userPass . indexOf ( ':' ) ;
3939 if ( colonIndex === - 1 ) return undefined ;
4040
41- // return credentials object
42- return new CredentialsImpl (
43- userPass . slice ( 0 , colonIndex ) ,
44- userPass . slice ( colonIndex + 1 ) ,
45- ) ;
41+ return {
42+ name : userPass . slice ( 0 , colonIndex ) ,
43+ pass : userPass . slice ( colonIndex + 1 ) ,
44+ } ;
4645}
4746
4847/**
@@ -65,13 +64,3 @@ const CREDENTIALS_REGEXP =
6564function decodeBase64 ( str : string ) : string {
6665 return Buffer . from ( str , 'base64' ) . toString ( ) ;
6766}
68-
69- class CredentialsImpl implements Credentials {
70- name : string ;
71- pass : string ;
72-
73- constructor ( name : string , pass : string ) {
74- this . name = name ;
75- this . pass = pass ;
76- }
77- }
You can’t perform that action at this time.
0 commit comments