agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
18 lines (15 loc) • 391 B
JavaScript
/**
* @file Get relative path
* @description Single responsibility: Calculate the relative path between two paths
*/
const path = require('path');
/**
* Get relative path
* @param {string} from - From path
* @param {string} to - To path
* @returns {string} Relative path
*/
function getRelativePath(from, to) {
return path.relative(from, to);
}
module.exports = getRelativePath;