src/node/file-util.js
function removeCommonPrefix(basedir, filedir) {
  var baseparts = basedir.split(path.sep);
  var fileparts = filedir.split(path.sep);

  var i = 0;
  while (i < fileparts.length && fileparts[i] === baseparts[i]) {
    i++;
  }
  return fileparts.slice(i).join(path.sep);
}
function removeCommonPrefix(basedir, filedir) {
  var baseparts = basedir.split(path.sep);
  var fileparts = filedir.split(path.sep);

  var i = 0;
  while (i < fileparts.length && fileparts[i] === baseparts[i]) {
    i++;
  }
  return fileparts.slice(i).join(path.sep);
}
function removeCommonPrefix ( basedir , filedir ) { var baseparts = basedir . split ( path . sep ) ; var fileparts = filedir . split ( path . sep ) ; var i = 0 ; while ( i < fileparts . length && fileparts [ i ] === baseparts [ i ] ) { i ++ ; } return fileparts . slice ( i ) . join ( path . sep ) ; }
Removes the common prefix of basedir and filedir from filedir
@param {string} basedir
@param {string} filedir
Removes the common prefix of basedir and filedir from filedir