path.js
function subModulePath(subModule, node_modules) {
  var index = subModule.indexOf("/");
  var length = subModule.length;
  if (index <= 0 || index + 1 == length) {
    return null;
  }
  var module = subModule.substring(0, index);
  var relative = subModule.substring(index + 1, length);

  var moduleDirectory = path.join(node_modules, module);
  var filePath = path.join(moduleDirectory, relative);
  return realRequirPath(filePath);
}
function subModulePath(subModule, node_modules) {
  var index = subModule.indexOf("/");
  var length = subModule.length;
  if (index <= 0 || index + 1 == length) {
    return null;
  }
  var module = subModule.substring(0, index);
  var relative = subModule.substring(index + 1, length);

  var moduleDirectory = path.join(node_modules, module);
  var filePath = path.join(moduleDirectory, relative);
  return realRequirPath(filePath);
}
function subModulePath ( subModule , node_modules ) { var index = subModule . indexOf ( "/" ) ; var length = subModule . length ; if ( index <= 0 || index + 1 == length ) { return null ; } var module = subModule . substring ( 0 , index ) ; var relative = subModule . substring ( index + 1 , length ) ; var moduleDirectory = path . join ( node_modules , module ) ; var filePath = path . join ( moduleDirectory , relative ) ; return realRequirPath ( filePath ) ; }
get the full path of subModule

@param subModule subModule
@returns {*} /User/XXXX/node_modules/module/relative.js
get the full path of subModule