![]() This makes creating modules an essential skill for a Node.js developer. Being able to write modules that export useful functions and data will allow you to contribute to the wider Node.js community-in fact, all packages that you use on npm were bundled and shared as modules. Describing a piece of code as a module refers less to what the code is and more to what it does-any Node.js file or collection of files can be considered a module if its functions and data are made usable to external programs.īecause modules provide units of functionality that can be reused in many larger programs, they enable you to create loosely coupled applications that scale with complexity, and open the door for you to share your code with other developers. ![]() In Node.js, a module is a collection of JavaScript functions and objects that can be used by external applications. ![]() The author selected the Open Internet/Free Speech Fund to receive a donation as part of the Write for DOnations program.
0 Comments
Leave a Reply. |