nodejs / examples

A repository of runnable Node.js examples that go beyond "hello, world!"
MIT License
649 stars 343 forks source link

fake-names-generator : Names generated in console are different from ones saved in file #35

Open senechalloic opened 3 years ago

senechalloic commented 3 years ago

Thanks for this repository, I'm learning NodeJs and this helps me.

Issue

I think there is a small issue in project cli/commander/fake-names-generator. When we choose to save the names, the display names are different than the one shown in the console.

RootCause

I think the issue come from logNames() and saveNames() that generate two times the names in cli\commander\fake-names-generator\bin\cli.js.

Possible solution

logNames() could return the generated names and pass it to saveNames().

Thiruppathi commented 2 years ago

Thanks for bringing this up. It is a good point, I'll create a fix for this.