lib/index.js
function processPath (sourcePath, errorMessage) {
  if (!sourcePath || typeof sourcePath !== 'string') {
    throw new Error(errorMessage);
  }
  if (!path.isAbsolute(sourcePath)) {
    sourcePath = path.join(process.cwd(), sourcePath);
  }
  return sourcePath;
}
function processPath (sourcePath, errorMessage) {
  if (!sourcePath || typeof sourcePath !== 'string') {
    throw new Error(errorMessage);
  }
  if (!path.isAbsolute(sourcePath)) {
    sourcePath = path.join(process.cwd(), sourcePath);
  }
  return sourcePath;
}
function processPath ( sourcePath , errorMessage ) { if ( ! sourcePath || typeof sourcePath !== 'string' ) { throw new Error ( errorMessage ) ; } if ( ! path . isAbsolute ( sourcePath ) ) { sourcePath = path . join ( process . cwd ( ) , sourcePath ) ; } return sourcePath ; }
Checks if a path exists and transforms it to an absolute if it's relative
@param {string} sourcePath
@param {string} errorMessage
@returns {string}
Checks if a path exists and transforms it to an absolute if it s relative