Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function basePathResolve(basePath, relativePath) {
if (helper.isUrlAbsolute(relativePath)) {
return relativePath;
}
if (!helper.isDefined(basePath) || !helper.isDefined(relativePath)) {
return '';
}
return path.resolve(basePath, relativePath);
}