fork(2) download
  1. let pattern = '//third-part';
  2.  
  3. let current = pattern.replace(/([^:]\/)\/+/g, "$1");
  4. current = current.startsWith('/') ? current : `/${current}`;
  5.  
  6. console.log('current way: ', current);
  7.  
  8. pullRequest = `/${pattern.replace(/\/+/, '')}`;
  9.  
  10. console.log('pull request: ', pullRequest);
Success #stdin #stdout 0.05s 18800KB
stdin
Standard input is empty
stdout
current way:  //third-part
pull request:  /third-part