mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-07-28 20:20:50 +00:00
13 lines
374 B
JavaScript
13 lines
374 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();
|
|
}
|
|
|
|
module.exports = getFileName; |