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

  • 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.

主站蜘蛛池模板: 沈丘县| 扶余县| 平和县| 简阳市| 宜昌市| 河津市| 山阳县| 洪泽县| 北流市| 观塘区| 东阳市| 开封县| 屯门区| 兴城市| 巫溪县| 离岛区| 龙海市| 奉新县| 蓝山县| 焦作市| 桂阳县| 信丰县| 临湘市| 涡阳县| 临桂县| 舞阳县| 连南| 怀来县| 中阳县| 太仆寺旗| 温州市| 望江县| 安泽县| 和顺县| 金川县| 黑龙江省| 盐山县| 呈贡县| 即墨市| 固安县| 宜宾县|