官术网_书友最值得收藏!

  • Node.js Design Patterns
  • Mario Casciaro Luciano Mammino
  • 148字
  • 2021-06-18 18:15:06

Summary

In this chapter, we explored in depth what modules are, why they are useful, and why we need a module system. We also learned about the history of modules in JavaScript and about the two module systems available today in Node.js, namely CommonJS and ESM. We also explored some common patterns that are useful when creating modules or when using third-party modules.

You should now be comfortable with understanding and writing code that takes advantage of the features of both CommonJS and ESM.

In the rest of the book, we will rely mostly on ES modules, but you should now be equipped to be flexible with your choices and be able to deal with CommonJS effectively if necessary.

In the next chapter, we will start to explore the idea of asynchronous programming with JavaScript, and we will examine callbacks, events, and their patterns in depth.

主站蜘蛛池模板: 沙湾县| 和顺县| 徐汇区| 福建省| 新泰市| 来安县| 余姚市| 丰原市| 彰化市| 太谷县| 泾源县| 美姑县| 安庆市| 屏东县| 浙江省| 河北区| 龙山县| 呼和浩特市| 宽甸| 阳原县| 焦作市| 紫阳县| 大庆市| 昌都县| 岫岩| 高清| 财经| 绍兴县| 汽车| 娄底市| 贡觉县| 广德县| 巫溪县| 大城县| 江津市| 宜黄县| 咸丰县| 呼图壁县| 永和县| 江达县| 南皮县|