export default ( fileList , fileObject ) => { const isArray = fileObject instanceof Array ; fileList . keys ( ) . forEach ( async ( fileName ) => { const fileConfig = fileList ( fileName ) ; const name = fileName . split ( '/' ) [ 1 ] . split ( '.' ) [ 0 ] ; if ( isArray ) { fileObject . push ( fileConfig . default ) ; } else { fileObject [ name ] = fileConfig . default ; } } ) ; return fileObject ; } ;