mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-07-29 12:20:11 +00:00
14 lines
389 B
JavaScript
14 lines
389 B
JavaScript
const { stripExt } = require('./utils.js');
|
|
|
|
function getFileName(file, data) {
|
|
|
|
const fileNameWithoutExt = stripExt(file);
|
|
|
|
// Validate if the file name matches any of the target.RECORD_TYPE values
|
|
const recordTypes = Object.values(data.target);
|
|
|
|
return recordTypes[0].name == fileNameWithoutExt.toLowerCase().split("/")[1];
|
|
}
|
|
|
|
module.exports = getFileName;
|