Language

Node.js convention

궁금한게 많은 개발자 2022. 4. 7. 11:50

참고 : google javascript style guide

 

Google JavaScript Style Guide

Google JavaScript Style Guide 1 Introduction This document serves as the complete definition of Google’s coding standards for source code in the JavaScript programming language. A JavaScript source file is described as being in Google Style if and only i

google.github.io

style guide : 단순히 사용의 편의뿐만이 아닌 논리적인 근거를 가진 convention 

ex) module import시 통일된 naming convention을 통해야 여러번 import하더라도 같은 일을 하게 됨

만약 같은 모듈을 abc, Abc, aBc라고 하면 같은 모듈을 import하더라도 여러번 load하게되고 다른 객체로 인식

(case insensitive하지만 접근시에는 case와 관계없이 import가 가능함) naming convention의 필요성