const environment = { isProduction : process . env . NODE_ENV === 'production' , } ; export function Logger ( env ) { return { log : ( ... args ) => { ! env . isProduction && console . log ( ... args ) ; } , } ; } export const logger = Logger ( environment ) ;