src/require.js
function _getRoot(obj) {
  return (getCallingDir(((obj && obj.basedir) ? obj.basedir : undefined)) || (obj?obj.basedir:undefined));
}
function _getRoot(obj) {
  return (getCallingDir(((obj && obj.basedir) ? obj.basedir : undefined)) || (obj?obj.basedir:undefined));
}
function _getRoot ( obj ) { return ( getCallingDir ( ( ( obj && obj . basedir ) ? obj . basedir : undefined ) ) || ( obj ? obj . basedir : undefined ) ) ; }
Get the root directory to use from the supplied object or calculate it.

@private
@param {Object} obj    The options object containing a 'dir' property.
@returns {string}      The directory path.
Get the root directory to use from the supplied object or calculate it .