lhanscom / ngx-csv

Helper library for create CSV file in Angular 7
MIT License
4 stars 5 forks source link

Question About Design Decision #1

Closed jakeleveroni closed 4 years ago

jakeleveroni commented 5 years ago

I just had a quick question about a design choice. It seems a little odd to me that the ngxCsv constructor is responsible for generating the csv and initiating the download. Is there a reason for this? It seems a little strange seeing a single new ngxCsv(data) call where the results aren't assigned to anything. Is there a reason this could not be a regular class method or a static method on the ngxCsv class?

I know its a small thing, I was just curious about it. Thanks again for the hard work on this, we just switched to using this package and it works great so far!

lhanscom commented 4 years ago

Apparently I haven't been notified about these issues, but in case you're still interested, I forked this code from alhazmy13 and changed the minimum to work with multiple versions of angular. So 'design' was not a big part of this for me.