agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
17 lines (14 loc) • 369 B
JavaScript
/**
* @file Get directory name from path
* @description Single responsibility: Extract the directory portion of a path
*/
const path = require('path');
/**
* Get directory name from path
* @param {string} filePath - File path
* @returns {string} Directory name
*/
function getDirname(filePath) {
return path.dirname(filePath);
}
module.exports = getDirname;