Skip to content

Commit

Permalink
carregar a lista
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipi0 committed Jul 1, 2023
1 parent 5993a9a commit ec4dc91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scriptFilipi.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ function listarLivros() {
const conteudo = biblioteca.map(livro => `${livro.titulo};${livro.autor};${livro.data}`).join('\n');
fs.writeFileSync(filename, conteudo);
}

function carregarBiblioteca() {
if (fs.existsSync(filename)) {
const conteudo = fs.readFileSync(filename, 'utf-8');
Expand All @@ -110,4 +109,5 @@ function listarLivros() {
biblioteca.push({ titulo, autor, data });
}
}
}
}

0 comments on commit ec4dc91

Please sign in to comment.