import fs from 'fs' ; param files returns export const findExists = ( files ) : string | false => { for ( const file of files ) { if ( fs . existsSync ( file ) && fs . statSync ( file ) . isFile ( ) ) { return file ; } } return false ; } ;