dotenv-vault icon indicating copy to clipboard operation
dotenv-vault copied to clipboard

refactored logout-service

Open kevinlaiGH opened this issue 2 years ago • 3 comments

  1. Switch to private properties.
  2. Use async/await consistently instead of mixing with .catch.
  3. Use a constant for the maximum check count instead of a magic number.

kevinlaiGH avatar Nov 07 '23 14:11 kevinlaiGH

Thanks for this @kevinlaiGH. Appreciate the contribution!

That said, can you please remove all the semicolons. This project somewhat follows 'standardjs' styling (though I need to get it added as part of the build/linting steps).

Also, can you remove the private functions. I'm not a fan of them in typescript/js code since JavaScript doesn't have a true concept of private functions. Also this is an open source library so I err on keeping functions public. (I personally hate when I need to do a simple monkey patch or method overload and can't because the library writer protected functions)

Otherwise, much better removing the .catch.

motdotla avatar Nov 07 '23 14:11 motdotla

Also, if you are interested in cleaning up style/linting, we really need a contribution to add standardjs, but for typescript. Would love that if you are interested in contributing more! https://standardjs.com/

motdotla avatar Nov 07 '23 14:11 motdotla

Thanks for the suggestions @motdotla. I have changed it accordingly. Could you review it again please? Cheers!

kevinlaiGH avatar Nov 08 '23 10:11 kevinlaiGH