lib/move-sync/index.js
function isSrcSubdir (src, dest) {
  try {
    return fs.statSync(src).isDirectory() &&
           src !== dest &&
           dest.indexOf(src) > -1 &&
           dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src)
  } catch (e) {
    return false
  }
}
function isSrcSubdir (src, dest) {
  try {
    return fs.statSync(src).isDirectory() &&
           src !== dest &&
           dest.indexOf(src) > -1 &&
           dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src)
  } catch (e) {
    return false
  }
}
function isSrcSubdir ( src , dest ) { try { return fs . statSync ( src ) . isDirectory ( ) && src !== dest && dest . indexOf ( src ) > - 1 && dest . split ( path . dirname ( src ) + path . sep ) [ 1 ] . split ( path . sep ) [ 0 ] === path . basename ( src ) } catch ( e ) { return false } }
return true if dest is a subdir of src, otherwise false. extract dest base dir and check if that is the same as src basename
return true if dest is a subdir of src otherwise false . extract dest base dir and check if that is the same as src basename