path.js
function requirePath(fromPath, require) {
  // console.log('requirePath:fromPath: ' + fromPath);
  // console.log('requirePath:require: ' + require);
  if (fromPath === null || fromPath === undefined
    || require === null || require === undefined) {
    return null;
  }
  var filePath = path.resolve(path.dirname(fromPath), require);
  return realRequirPath(filePath);
}
function requirePath(fromPath, require) {
  // console.log('requirePath:fromPath: ' + fromPath);
  // console.log('requirePath:require: ' + require);
  if (fromPath === null || fromPath === undefined
    || require === null || require === undefined) {
    return null;
  }
  var filePath = path.resolve(path.dirname(fromPath), require);
  return realRequirPath(filePath);
}
function requirePath ( fromPath , require ) { // console.log('requirePath:fromPath: ' + fromPath); // console.log('requirePath:require: ' + require); if ( fromPath === null || fromPath === undefined || require === null || require === undefined ) { return null ; } var filePath = path . resolve ( path . dirname ( fromPath ) , require ) ; return realRequirPath ( filePath ) ; }
get required file full path

@param fromPath /User/XXXX/node_modules/module/index.js
@param require ./require
@returns {*} /User/XXXX/node_modules/module/require/index.js
get required file full path