nó js verifique se chamado do módulo
if (require.main === module) {
console.log('called directly');
} else {
console.log('required as a module');
}
garzj
if (require.main === module) {
console.log('called directly');
} else {
console.log('required as a module');
}