Snake_case or camelCase in node.js [closed]

As Occam’s razor principle says, the simplest solution is the best one.

If you have client’s requirements on the one hand and node.js code style guides on the other hand. I would take the simplest solution satisfying the both. External API should be snake case and internally you can use camel case. If you stick to consistency you can use snake case everywhere, as I assume client’s requirements have higher priority.

I would really avoid any additional layers for converting cases as it introduces additional complexity to the final solution, it can have additional errors, and it will require additional maintenance in the future.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)