New answers tagged

1 vote
Accepted

Basic node login routes for authentication system

Short answer is -- yes, you're using try/catch excessively. When working with errors in general, you'll want to determine which type of error you're throwing. Did the user make a mistake? (400) Is ...
user avatar
1 vote

Using a RegEx to create a UUID string

A general rule to follow when it comes to conditionals is to pull out the one thing that's actually different. In your case, it's really just a segment of the URL. The rest remained the same. So ...
user avatar
  • 24.8k
4 votes
Accepted

Updating large and heavily nested JSON properties based on existing properties using nested forEach loops

I don't think there is a more 'performant' way of doing it, as you need to transform all elements. There might be slight tradeoffs over whether forEach is better/...
user avatar
1 vote
Accepted

Process a binary file by chunk using a read stream in nodejs

🏎️ Performance Matters, only when it matters I want to process a file chunk by chunk to prevent memory exhaustion. Are you sure this is necessary? I would say it's fair to assume almost all ...
user avatar
  • 446

Top 50 recent answers are included