lib/util/file-finder.js
function normalizeDirectoryEntries(entries, directory, supportedConfigs) {
    const fileHash = {};

    entries.forEach(entry => {
        if (supportedConfigs.indexOf(entry) >= 0) {
            const resolvedEntry = path.resolve(directory, entry);

            if (fs.statSync(resolvedEntry).isFile()) {
                fileHash[entry] = resolvedEntry;
            }
        }
    });
    return fileHash;
}
function normalizeDirectoryEntries(entries, directory, supportedConfigs) {
    const fileHash = {};

    entries.forEach(entry => {
        if (supportedConfigs.indexOf(entry) >= 0) {
            const resolvedEntry = path.resolve(directory, entry);

            if (fs.statSync(resolvedEntry).isFile()) {
                fileHash[entry] = resolvedEntry;
            }
        }
    });
    return fileHash;
}
function normalizeDirectoryEntries ( entries , directory , supportedConfigs ) { const fileHash = { } ; entries . forEach ( entry => { if ( supportedConfigs . indexOf ( entry ) >= 0 ) { const resolvedEntry = path . resolve ( directory , entry ) ; if ( fs . statSync ( resolvedEntry ) . isFile ( ) ) { fileHash [ entry ] = resolvedEntry ; } } } ) ; return fileHash ; }
Create a hash of filenames from a directory listing
@param {string[]} entries Array of directory entries.
@param {string} directory Path to a current directory.
@param {string[]} supportedConfigs List of support filenames.
@returns {Object} Hashmap of filenames
Create a hash of filenames from a directory listing